This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]