473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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
3 1877
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ME | last post by:
I am trying to find a prewritten method for converting a string like this:"Hello World" to this "Hello\sWorld". I plan to use it to build a regular expression. Specifically I am looking for a...
9
by: PG | last post by:
Hi gurus, I have AIX visual age C++ compiler version 5.0.2.3. I have a simple hello world program that gives compilation errors. Any help will be appreciated. Thanks PG ***test.cpp**** ...
6
by: Matthew | last post by:
How would I go about creating a simple "hello world" program that will run in Unix. I am using MS Visual C++.
21
by: Alf P. Steinbach | last post by:
Just because there seems to be a lack of post-standard _correct_ tutorials: <url: http://home.no.net/dubjai/win32cpptut/>. Disclaimer: written this evening so perhaps there are "bugs" in the...
33
by: ankursinha | last post by:
Hi, Is it possible to write a C program that prints "Hello World" on screen without having a single semi-colon in the entire program? The extra constraint here is that u r not allowed to use...
42
by: Prashanth Badabagni | last post by:
Hi, Can any body tell me how to print "hello,world" with out using semicolon Thanks in advance .. Bye Prashanth Badabagni
8
by: vijay | last post by:
Hello, As the subject suggests, I need to print the string in the reverse order. I made the following program: # include<stdio.h> struct llnode { char *info;
3
by: lovecreatesbeauty | last post by:
Both `K&R C, 2nd' and `C: A reference manual, 5th' introduce the "hello, world" thing using the name "string-constant". But `ISO/IEC 9899:TC2' does not include this kind of thing in section `A.1.5...
5
by: Andrea | last post by:
Hi, I'm a newbie i want to know how can i convert string to its binary representation, i want to write a program where an example string "hello world" is transformed in his binary representation...
0
by: Gerardo Herzig | last post by:
Hi all. Im having some "problems" with a small concurrent plpython function. Based on a small example about concurrent programming, there is some code which works fine under python: #!...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.