This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
archives and header files
- From: "Walter Joyce" <wjoyce at bestweb dot net>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 28 May 2002 06:54:28 -0400
- Subject: archives and header files
How do I know what C library file or archive needs to be specified
when compiling C programs (with gcc)? For example, if I want the
math library and I use the math.h header file, I need to use the
"-lm" option in the command line for the compiler. What are the
names (like "m" for math) for the other header file and archives to
use in the "-l" option? Is there a list somewhere?
I've been looking through the GLIBC manual / GCC manual and I don't
see the answer. The manuals tell you which library in terms of
header files but not which archive contains the functions.
A related question is: how can I find which functions are
defined in any given archive (library) file (to approach the
problem from the other direction)?
- Walt Joyce
wjoyce@bestweb.net