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]

Re: How to use sqrtf in gcc?


On Wed, 30 Jan 2002, Thai Dang Vu wrote:

> I cannot use sqrt or sqrtf functions in gcc.
> I can link the above program, but cannot build it. I received a message
> that there was no referrence to sqrtf on building it.

Add -lm option during linking
( -lm === MATH_LIBRARY )

   cc foo.o -o foo -lm

Regards,
Bharathi S.


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