Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 06-04-2004, 02:36 PM   #1
LQ Newbie
Registered: May 2004
Posts: 5

Rep: Reputation: 0
gcc on 9.1 include problem

I just installed Slackware 9.1 on my desktop machine, to do some development. I installed the entire development distribution set. After installing, I wrote a simple hello world program to test everything:

#include <stdio.h>

void main(void) {
printf("Hello World\n");

But when i do : gcc -o test test.c I get a screenful of parse errors from stdio.h all like this:

/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/stdio.h:360 syntax error before "extern"

and about fifty more lines like it with slightly different syntax errors. Anybody know what I'm doing wrong or is there something I need to do to fix gcc?
Old 06-04-2004, 09:06 PM   #2
Registered: Oct 2003
Location: North Carolina, USA
Distribution: Slackware 11
Posts: 174

Rep: Reputation: 30
I compiled your program on my slackware (current) and it ran fine.

Just a thought but....

you said you installed all development stuff.

Did you grab all the library stuff too ("L" series?)
Old 06-04-2004, 09:47 PM   #3
LQ Newbie
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you very much 187807. That fixed my problem. I needed to install the libc package from the l/ distribution set. I'm not that familiar with how they do the packages, but I guess that makes sense.
Old 06-04-2004, 10:05 PM   #4
Registered: Sep 2003
Posts: 173

Rep: Reputation: 30
The libraries have all the functions that you call within your programs. The packages have the header files .h as well as the .libs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add boost libraries to gcc include list kiku Linux - Newbie 1 03-04-2005 02:49 PM
gcc include apocolpse Programming 6 11-03-2004 01:36 PM
GCC:- 'cout' is an undeclared function when #include <iostream> is included? caesius_01 Programming 5 04-04-2004 11:00 AM
gcc STL include problem finidi Programming 3 01-14-2003 06:55 AM
GCC include path. jwilson Linux - General 1 04-02-2001 03:58 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration