Programming and Scripting :: Getting gcc-3.0 to work



Hi, i just apt-get'ed gcc-3.0 but im having trouble compiling a 'hello world' test program. It appears gcc cant find some required headers. The code im compiling is

Code Sample

#include <stdio.h>

int main() {
   int i;

   i = 5;

   printf("i is %d", i);

   return 0;
}


and the error is

Code Sample

r/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:138:28: bits/stdio_lim.h: No such file or directory
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:151: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:158: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:193: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:211: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:263: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:283: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:288: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:337: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:360: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:364: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:384: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:416: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:451: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:464: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:472: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:486: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:504: parse error before "fpos_t"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:507: parse error before '*' token
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:540: parse error before "THROW"
/usr/lib/gcc-lib/i386-linux/3.0.4/include/stdio.h:544: parse error before "THROW"
test.c:3: syntax error before "int"


Unfortunately thats not all of it but you get the idea. It cant find some header files. Its probably worth pointing out that the directory its looking for that header file in 'bits/' doesnt exist in /usr/include.

ANy ideas?

Thanks,
nnp

hey cool i get similar errors.

i haven't figured out how fix it.

Hi there,
I need a help. I tried DSL Live CD last night, it's running fast on my P II machine.
I want to compile and run my fortran 77 code. What should I do to make the g77 or g95 available. In my office, I just g95 to  compile my fortran code.
Thanks.

the frugal gcc's work okay. looks like a HD-install issue.
Quote (humpty @ Jan. 16 2007,18:30)
the frugal gcc's work okay. looks like a HD-install issue.

Please step by step. I am newbie don't know how. Thanks
Next Page...
original here.