Cygwin Perl and -Duselongdouble

Sisyphus sisyphus1@optusnet.com.au
Fri Jul 27 10:20:00 GMT 2007


----- Original Message ----- 
From: "Brian Dessent" <brian@dessent.net>
.
.
>> If I can successfully run 'gcc script.c' (where 'script.c' contains a 
>> call
>> to 'sqrtl') then I'm inclined to say that sqrtl is "available in the C
>> compiler" (or something like that).
>
> But you can't.  That command should fail on Cygwin.

It certainly works for me for 'sqrtl' (but fails for 'frexpl' with 
"undefined reference to `_frexpl'"):

--------------------------------------
Rob@desktop2 ~/C
$ cat script.c
#include <stdio.h>

int main(void) {
    long double x = sqrtl(7);
    printf("%.19Lf\n", x);
    return 0;
}

Rob@desktop2 ~/C
$ gcc script.c

Rob@desktop2 ~/C
$ ./a.exe
2.6457513110645905904

Rob@desktop2 ~/C
--------------------------------------

[Snip - a most helpful explanation of where libc and newlib fit into the 
picture, and of other aspects that I was finding confusing. Thanks for that 
Brian ... much appreciated.]

Cheers,
Rob 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list