long math functions on cygwin
Andrew Haley
aph@redhat.com
Tue Nov 18 15:23:00 GMT 2008
Andrew Haley wrote:
> Manal Helal wrote:
>> I am trying to compile some unix code on cygwin, using gcc version:
>
>> and I get these errors:
>>
>> *****************************************
>> /home/user/proj/main.c:907: undefined reference to `_sqrtl'
>> /home/user/proj/main.c:1743: undefined reference to `_powl'
>> /home/user/proj/main.c:2006: undefined reference to `_ceill'
>> /home/user/proj/main.c:2035: undefined reference to `_floorl'
>> *****************************************
>>
>>
>>
>> Can you please help me find what is missing?
>
> But you're not going to tell us the command line you used to link, right?
> Is it secret?
>
> I'm guessing you missed "-lm".
... or maybe just an old version of libc that doesn't have long double functions,
in which case, unless you have some pretty extraordinary requirements, you can
simply use the double variants.
Andrew.
More information about the Gcc-help
mailing list