[olug] missing C standard library?

Christopher Cashell topher at zyp.org
Thu Feb 27 20:12:30 UTC 2003


At Thu, 27 Feb 03, Unidentified Flying Banana Brian Wiese, said:

> Apparently I'm missing the gcc standard libaries... Does anyone know of
> the deb package for this[1]?  I've looked and looked... 

The standard Debian naming convention is libfoo for the runtime
libraries and support for foo, and libfoo-dev for the development
headers and object files and such.  So, to run a precompiled program,
libfoo will do it.  To compile a program that needs libfoo, you need
libfoo-dev.

> I try to compile this c code, and it says that all of the header files are
> missing, "stdio.h, stdlib.h, ctype.h, string.h".  I have gcc, libc6, and
> make installed.  Is there a glibc package, or maybe some env variable I
> have to set? 

libc6 == glibc2.  (The naming is odd because of the switch from the
original glibc to a different Linux libc, which then, when linux libc5
began stagnating, switched back to glibc (then glibc2).)

The package you need is libc6-dev.

Here's a little trick that you can use on Debian, if you know the name
of a particular file you are looking for, but don't know what package it
is in.  For example, above you know you're looking for certain header
files.  You could do: 'dpkg -S "stdlib.h" '.  That would list every
occurrence of 'stdlib.h' in all Debian packages.  If you did it, you'd
get a list of a dozen or two results[1], and a quick glance would show
this: libc6-dev: /usr/include/stdlib.h, somewhere in the list.

>   Brian Wiese | bwiese at cotse.com | aim: unolinuxguru

[1] nexus:~$ dpkg -S 'stdlib.h'
    cmix: /usr/share/cmix/shadow/stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/ansi.api/stdlib.h
    cint: /usr/lib/cint/include/stdlib.h
    libfreetype6-dev: /usr/include/freetype2/freetype/config/ftstdlib.h
    perl-tk: /usr/lib/perl5/Tk/pTk/compat/stdlib.h
    libstlport4.5-common: /usr/include/stlport/stdlib.h
    libstdc++3-dev: /usr/include/g++-v3/bits/std_cstdlib.h
    tendra: /usr/lib/TenDRA/lib/include/iso.api/stdlib.h
    splint: /usr/share/splint/lib/stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/cpp.api/stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/svid3.api/stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/xpg3.api/stdlib.h
    libc6-dev: /usr/include/stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/xpg4.api/stdlib.h
    bash-builtins: /usr/include/bash/ansi_stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/unix95.api/stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/posix1.api/stdlib.h
    mingw32-runtime: /usr/i586-mingw32msvc/include/stdlib.h
    tendra: /usr/lib/TenDRA/lib/include/posix2.api/stdlib.h
    libboost-dev: /usr/include/boost/cstdlib.hpp
    tendra: /usr/lib/TenDRA/lib/include/posix.api/stdlib.h
    libstdc++4-doc: /usr/share/doc/gcc-3.1-base/libstdc++/html_user/cstdlib.html

-- 
| Christopher
+------------------------------------------------+
| A: No.                                         |
| Q: Should I include quotations after my reply? |
+------------------------------------------------+




More information about the OLUG mailing list