This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: long math functions on cygwin
- From: Andrew Haley <aph at redhat dot com>
- To: Manal Helal <manalorama at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 18 Nov 2008 11:17:48 +0000
- Subject: Re: long math functions on cygwin
- References: <4922A1E9.3080608@gmail.com> <4922A2DE.90504@redhat.com>
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.