Mail Archives: djgpp/1997/07/07/15:18:35
>Hi
>I'm new at using C, C++, etc in any form, and I would like to know how
>you go about specifying which libarys for DJGPP to use. I know how to
>use Include files, but i'm not sure about Librarys. Could someone
>please tell me how to use librarys.
To make gcc search a new path for libraries on the command line use
the -L/path/to/library argument and then to link in a library use the
-llibname. So to use the math library you would type
gcc -o foo.exe foo.c -lm
or for an allegro application
gcc -o foo.exe foo.c -lalleg
or for one of your own apps
gcc -o foo.exe foo.c -L./lib -lmine
Lonnie McCullough
lonniem AT cs DOT utexas DOT edu
- Raw text -