Installing GCC.
I want to install GCC on my ZIPSLACK dist but when I try to compile this code:
#include <stdio.h>
int main()
{
printf("hello\n");
return 0;
}
I get the following errors:
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/incude/stddef.h:213: Syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/incude/stdio.h:45:15: bits/types.h No such file or directory
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/incude/stdio.h:55: Syntax error before "typedef"
...and so on.
What is wrong? And why can''t I use "gcc test.c –o test > outfile.txt" to capture all the output from the program? I just end up with an empty file.
I have installed all the packages located in the /d directory from slackware (except JDK).
the reason you won''t catch all output is because you only catched stdout, not the error output stream too. for this you need a 2>&1 too at the end (i think it was like this)
and what GCC you use? perhaps the installation is not complete or the compiler looks in the wrong include directory.
and what GCC you use? perhaps the installation is not complete or the compiler looks in the wrong include directory.
Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine
I''m also missing the file features.h. Maybe I forgot to install a package. Does anyone know where this file can be found?
I have now managed to capture the stderr data by writing: gcc test.c 2> errorfile
This is the complete error message:
In file included from test.c:1:
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:37:23: features.h: No such file or directory
In file included from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:43,
from test.c:1:
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stddef.h:213: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:45:25: bits/types.h: No such file or directory
In file included from test.c:1:
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:55: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:71: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:81:19: libio.h: No such file or directory
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:97: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:147:28: bits/stdio_lim.h: No such file or directory
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:151: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:161: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:161: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:163: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:167: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:170: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:170: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:180: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:207: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:209: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:209: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:211: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:225: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:228: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:229: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:233: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:280: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:283: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:283: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:288: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:302: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:304: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:305: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:307: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:310: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:314: syntax error before "_G_va_list"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:316: syntax error before "_G_va_list"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:320: syntax error before "_G_va_list"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:358: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:360: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:361: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:363: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:366: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:388: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:390: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:390: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:391: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:394: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:413: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:415: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:415: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:416: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:419: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:447: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:449: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:450: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:454: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:484: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:486: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:487: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:490: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:494: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:499: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:502: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:520: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:522: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:522: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:524: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:526: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:553: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:556: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:556: syntax error before "fpos_t"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:559: syntax error before ''*'' token
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:582: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:584: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:584: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:586: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:588: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:599: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:601: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:601: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:608:30: bits/sys_errlist.h: No such file or directory
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:686: syntax error before "__END_DECLS"
test.c:3: syntax error before "int"
--------------------------------------------
Sorry for the long post.
This is the complete error message:
In file included from test.c:1:
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:37:23: features.h: No such file or directory
In file included from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:43,
from test.c:1:
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stddef.h:213: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:45:25: bits/types.h: No such file or directory
In file included from test.c:1:
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:55: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:71: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:81:19: libio.h: No such file or directory
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:97: syntax error before "typedef"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:147:28: bits/stdio_lim.h: No such file or directory
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:151: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:161: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:161: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:163: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:167: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:170: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:170: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:180: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:207: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:209: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:209: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:211: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:225: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:228: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:229: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:233: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:280: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:283: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:283: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:288: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:302: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:304: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:305: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:307: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:310: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:314: syntax error before "_G_va_list"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:316: syntax error before "_G_va_list"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:320: syntax error before "_G_va_list"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:358: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:360: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:361: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:363: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:366: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:388: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:390: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:390: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:391: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:394: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:413: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:415: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:415: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:416: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:419: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:447: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:449: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:450: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:454: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:484: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:486: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:487: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:490: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:494: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:499: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:502: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:520: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:522: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:522: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:524: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:526: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:553: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:556: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:556: syntax error before "fpos_t"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:559: syntax error before ''*'' token
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:582: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:584: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:584: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:586: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:588: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:599: syntax error before "__BEGIN_NAMESPACE_STD"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:601: syntax error before "extern"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:601: syntax error before "__THROW"
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:608:30: bits/sys_errlist.h: No such file or directory
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:686: syntax error before "__END_DECLS"
test.c:3: syntax error before "int"
--------------------------------------------
Sorry for the long post.
to me this looks heavily like your installation is corrupt. i donno how this can happen but try reinstall it.
Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine
I''m not sure, but this could be caused by an overoptimization of your compilation of GCC.
Zorx (a Puzzle Bobble clone)
Discontinuity (an animation system for POV-Ray)
Zorx (a Puzzle Bobble clone)
Discontinuity (an animation system for POV-Ray)
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
I think RPTD was right about my installation being corrupt. I downloaded everything again today but this time the compiler complained about not finding stdio.h.
I don''t know if I have to make any changes in any configuration files. Perhaps the packages are intended to be used with real Slackware dist.
I don''t know if I have to make any changes in any configuration files. Perhaps the packages are intended to be used with real Slackware dist.
just "find" stdio.h and make sure it''s in your include path. maybe your install was messed up, but fixing simple pathing problems should be easy enough.
-me
-me
IT DOESN''T EXIST!
I have searched for stdio.h but I didn''t find it. Instead I found a file called NOSTDIO.H.
I have searched for stdio.h but I didn''t find it. Instead I found a file called NOSTDIO.H.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement