[wplug] gcc libraries
Weber, Lawrence A
laweber at switch.com
Wed Mar 12 08:51:18 EST 2008
Thank you so much.
>-------------------------------------------
Lawrence A. Weber
Consulting Engineer
>ANSALDO STS
>Union Switch & Signal
>1000 Technology Drive
>Pittsburgh, PA 15219-3120
>Ph: 412-688-2319
>Email: laweber at switch.com
-------------------------------------------
-----Original Message-----
From: wplug-bounces+laweber=switch.com at wplug.org
[mailto:wplug-bounces+laweber=switch.com at wplug.org] On Behalf Of Mathieu
Dube
Sent: Wednesday, March 12, 2008 9:39 AM
To: General user list
Subject: Re: [wplug] gcc libraries
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.
_______________________________________________
wplug mailing list
wplug at wplug.org
http://www.wplug.org/mailman/listinfo/wplug
More information about the wplug
mailing list