Re: Link error with __builtin_sincosf()
Re: Link error with __builtin_sincosf()
- Subject: Re: Link error with __builtin_sincosf()
- From: Jens Ayton <email@hidden>
- Date: Fri, 30 Mar 2007 12:37:30 +0200
- Openpgp: id=84FF254B
email@hidden:
>
> This may be more of a gcc question, but I'm having trouble with the __builtin_sincosf() intrinsic. I get a link error that '_sincosf' is an undefined symbol. For example, try compiling:
>
> void mysincosf(float x, float* s, float* c) {
> __builtin_sincosf(x, s, c);
> }
>
> This happens on both Intel and PPC platforms. Any ideas? (For that matter, is there a compiler intrinsic that calculates reciprocal square root?)
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Other-Builtins.html says no.
Also, it says that "Many of these functions are only optimized in certain
cases; if they are not optimized in a particular case, a call to the library
function will be emitted." The Mac OS X maths library does not provide
sincos*(), which is a non-standard extension, so a library call is emitted and
not resolved.
Solution: either use sinf and cosf directly, or provide your own
implementation of sincosf() which does so.
--
Jens Ayton
Sed quis custodiet ipsos custodes?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden