By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,042 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,042 IT Pros & Developers. It's quick & easy.

Newbie: on "Hello, world" -data definition has no type. how tocheck proper configuration

P: n/a
Hi, all.

As you can see I'm just begining on C. with the tutorial "Sams Teach
Yourself C in 24 Hours" as a starter. on aix 5.2 when compiling a
helloWorld the gcc throws some warnings the system adminitrator
does'nt know anything about. could you point me where to check the
gcc conf. or what i'm doing wrong

Atropo@seagullmore captura.c
#include <stdio.h>
main()
{
int ch;
printf("Please type in one character:\n");
ch = getc(stdin);
printf("The character you just entered is: %c\n", ch);
return 0;
}

Atropo@seagullgcc captura.c
In file included from /usr/include/sys/m_types.h:40,
from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/sys/types.h:393,
from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/stdio.h:366,
from captura.c:1:
/usr/include/sys/vm_types.h:65: parse error before `vmid64_t'
/usr/include/sys/vm_types.h:65: warning: data definition has no type
or storage class
/usr/include/sys/vm_types.h:66: parse error before `rpn64_t'
/usr/include/sys/vm_types.h:66: warning: data definition has no type
or storage class
/usr/include/sys/vm_types.h:67: parse error before `cnt64_t'
/usr/include/sys/vm_types.h:67: warning: data definition has no type
or storage class
/usr/include/sys/vm_types.h:86: parse error before `psize_t'
/usr/include/sys/vm_types.h:86: warning: data definition has no type
or storage class

Atropo@seagulluname -a
AIX cofeerd1b 2 5 000C569D4C00
Jun 27 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On May 23, 7:29*am, Atropo <lxvasq...@gmail.comwrote:
Hi, all.

As you can see I'm just begining on C. with the tutorial "Sams Teach
Yourself C in 24 Hours" as a starter. *on aix 5.2 when compiling a
helloWorld the gcc *throws some warnings the system adminitrator
does'nt know anything about. *could you point me where to check the
gcc conf. *or what i'm doing wrong

Atropo@seagullmore captura.c
#include <stdio.h>
main()
{
int ch;
printf("Please type in one character:\n");
ch = getc(stdin);
printf("The character you just entered is: %c\n", ch);
return 0;

}

Atropo@seagullgcc captura.c
In file included from /usr/include/sys/m_types.h:40,
* * * * * * * * *from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/sys/types.h:393,
* * * * * * * * *from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/stdio.h:366,
* * * * * * * * *from captura.c:1:
/usr/include/sys/vm_types.h:65: parse error before `vmid64_t'
/usr/include/sys/vm_types.h:65: warning: data definition has no type
or storage class
/usr/include/sys/vm_types.h:66: parse error before `rpn64_t'
/usr/include/sys/vm_types.h:66: warning: data definition has no type
or storage class
/usr/include/sys/vm_types.h:67: parse error before `cnt64_t'
/usr/include/sys/vm_types.h:67: warning: data definition has no type
or storage class
/usr/include/sys/vm_types.h:86: parse error before `psize_t'
/usr/include/sys/vm_types.h:86: warning: data definition has no type
or storage class

Atropo@seagulluname -a
AIX cofeerd1b 2 5 000C569D4C00
It looks like your compiler is for an AIX4.3 O/S, but you are using
AIX5.2.
You need to get an compiler and associated development kit for 5.2.
--
Fred Kleinschmidt
Jun 27 '08 #2

P: n/a
Atropo <lx*******@gmail.comwrites:
As you can see I'm just begining on C. with the tutorial "Sams Teach
Yourself C in 24 Hours" as a starter. on aix 5.2 when compiling a
helloWorld the gcc throws some warnings the system adminitrator
does'nt know anything about. could you point me where to check the
gcc conf. or what i'm doing wrong

Atropo@seagullmore captura.c
#include <stdio.h>
main()
{
int ch;
printf("Please type in one character:\n");
ch = getc(stdin);
printf("The character you just entered is: %c\n", ch);
return 0;
}

Atropo@seagullgcc captura.c
In file included from /usr/include/sys/m_types.h:40,
from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/sys/types.h:393,
from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/stdio.h:366,
from captura.c:1:
/usr/include/sys/vm_types.h:65: parse error before `vmid64_t'
[snip]

The program should compile without error, though you might get a
warning on your declaration of main (it should be "int main(void)"
rather than "main()". Once you get this problem straightened out,
look into passing more options to gcc so it gives you more warnings.
And always indent your code for clarity. (If you're using tabs for
indentation, try using spaces instead, at least for code you post to
Usenet.)

It looks like gcc is installed incorrectly on your system. (Perhaps
the OS was upgraded since the last time gcc was installed?) You
should get the same errors with this trivial program:

#include <stdio.h>
int main(void)
{
return 0;
}

Show that program and the error messages to your sysadmin and let
him/her worry about it.

Any questions about fixing this problem should be addressed to
gnu.gcc.help and/or comp.unix.aix.

In the meantime, AIX has its own native C compiler. I think it's
called "xlc", or you might be able to invoke it as "cc". Try using
that instead.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #3

P: n/a
On May 23, 11:54*am, Keith Thompson <ks...@mib.orgwrote:
Atropo <lxvasq...@gmail.comwrites:
As you can see I'm just begining on C. with the tutorial "Sams Teach
Yourself C in 24 Hours" as a starter. *on aix 5.2 when compiling a
helloWorld the gcc *throws some warnings the system adminitrator
does'nt know anything about. *could you point me where to check the
gcc conf. *or what i'm doing wrong
Atropo@seagullmore captura.c
#include <stdio.h>
main()
{
int ch;
printf("Please type in one character:\n");
ch = getc(stdin);
printf("The character you just entered is: %c\n", ch);
return 0;
}
Atropo@seagullgcc captura.c
In file included from /usr/include/sys/m_types.h:40,
* * * * * * * * *from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/sys/types.h:393,
* * * * * * * * *from /usr/local/lib/gcc-lib/powerpc-ibm-
aix4.3.2.0/2.8.1/include/stdio.h:366,
* * * * * * * * *from captura.c:1:
/usr/include/sys/vm_types.h:65: parse error before `vmid64_t'

[snip]

The program should compile without error, though you might get a
warning on your declaration of main (it should be "int main(void)"
rather than "main()". *Once you get this problem straightened out,
look into passing more options to gcc so it gives you more warnings.
And always indent your code for clarity. *(If you're using tabs for
indentation, try using spaces instead, at least for code you post to
Usenet.)

It looks like gcc is installed incorrectly on your system. *(Perhaps
the OS was upgraded since the last time gcc was installed?) *You
should get the same errors with this trivial program:

#include <stdio.h>
int main(void)
{
* * return 0;

}

Show that program and the error messages to your sysadmin and let
him/her worry about it.

Any questions about fixing this problem should be addressed to
gnu.gcc.help and/or comp.unix.aix.

In the meantime, AIX has its own native C compiler. *I think it's
called "xlc", or you might be able to invoke it as "cc". *Try using
that instead.

--
Keith Thompson (The_Other_Keith) ks...@mib.org *<http://www.ghoti.net/~kst>
Nokia
"We must do something. *This is something. *Therefore, we must do this.."
* * -- Antony Jay and Jonathan Lynn, "Yes Minister"- Hide quoted text -

- Show quoted text -
Thanks Keith and Fred.
really did'nt notice it shows 4.3 version of OS. I'll pass the case
to sysadmin. the xlc and cc are not on the system either.
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.