[wplug] gcc libraries

Mathieu Dube mujo at dubix.org
Wed Mar 12 08:38:42 EST 2008


On Wed, Mar 12, 2008 at 09:32:31AM -0400, Weber, Lawrence A wrote:
> I have several PC's running Fedora Core 6 or 8.  All gcc compilers are as originally installed during the Linux installation.
> 
> When I compile programs using gcc libraries such as <math.h> I get "undefined reference" errors for each library function called.
> 
> It appears as if the include files are found but the linker is not able to find the libraries.
> 
> I have used the compiler to build and install other applications without any problems.  I did not have to adjust the search directories on other Linux installations, any idea what I am doing wrong?

you need to link with -lm

eg:

gcc -o test -lm test.c

-M
-- 
This sig space is for rent.


More information about the wplug mailing list