standard include files not found

Need help with C, C++, perl, python, etc?

standard include files not found

Postby jimk » 2007-05-11 00:09

I just installed debian from testing (I was on debian before, but it was at least 4 years old). I have a bunch of tools (little C programs) that I use, and when I tried to compile them gcc cant find the standard C header files (e.g. stdlib.h, string.h, ctype.h, ...). Here is the compile cmd:
gcc -g -o beep beep.c
not much to go wrong, as this compiled before the fresh install. What am I missing?

I used synaptic to install gcc, so I expect it caught all the dependencies. Here is the gcc version:

gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)


JimK
jimk
 
Posts: 3
Joined: 2007-04-19 23:01

Postby chealer » 2007-05-11 00:26

Do you have stdlib.h on your system? If not, I guess you're missing the package providing libc6's header files.
chealer
 
Posts: 671
Joined: 2005-09-24 16:11
Location: Kebekia, Kanada

Postby jimk » 2007-05-11 00:59

You hit the nail on the head! I searched for libc6 packages and there it was: libc6-dev containing header files and other stuff needed to compile c programs. I can now compile, thanks, but that begs the question: why doesn't installing the compiler package bring these in also???

JimK
jimk
 
Posts: 3
Joined: 2007-04-19 23:01

Postby rickh » 2007-05-11 01:07

why doesn't installing the compiler package bring these in also???


This is Debian ... If you want it, you have to ask for it.
Debian-Lenny/Sid 32/64
Desktop: Generic Core 2 Duo, EVGA 680i, Nvidia
Laptop: Generic Intel SIS/AC97
User avatar
rickh
 
Posts: 3473
Joined: 2006-06-29 02:13
Location: Albuquerque, NM USA

Postby chealer » 2007-05-11 01:08

Because gcc only recommends libc-dev, since it doesn't actually depend on it. You need to check recommendations by yourself if you don't use a package manager which installs them by default such as Synaptic.
chealer
 
Posts: 671
Joined: 2005-09-24 16:11
Location: Kebekia, Kanada

Postby chealer » 2007-05-11 01:10

rickh wrote:
why doesn't installing the compiler package bring these in also???


This is Debian ... If you want it, you have to ask for it.

That was silly. Go use Slackware.
chealer
 
Posts: 671
Joined: 2005-09-24 16:11
Location: Kebekia, Kanada

Postby Jackiebrown » 2007-05-11 02:27

rickh wrote:This is Debian ... If you want it, you have to ask for it.


Exactly why I quit with the Debian based distro and went for straight Debian. Then I fell in love with it for many other reasons but that was the first.
User avatar
Jackiebrown
 
Posts: 1276
Joined: 2007-01-02 04:46
Location: San Antonio, TX


Return to Programming

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable