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: long math functions on cygwin


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.


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