Re: std::log10() problem
Re: std::log10() problem
- Subject: Re: std::log10() problem
- From: "Roni Music" <email@hidden>
- Date: Thu, 30 Mar 2006 11:29:38 +0200
>
On Mar 29, 2006, at 1:30 PM, j o a r wrote:
On 29 mar 2006, at 23.14, Clark Cox wrote:
Because that's the way it's supposed to work. If you want to target
an
old version of the OS, you use the SDK that corresponds to that
version. If you use the 10.4 SDK, you are telling Xcode, "I only care
about running my app on versions of the OS greater than or equal to
10.4".
That's what I thought too, but Chris Espinosa thinks otherwise (and
he should know!):
<http://www.cocoabuilder.com/archive/message/xcode/2006/1/31/3502>
I filed a follow up question, but never got any answers:
<http://www.cocoabuilder.com/archive/message/xcode/2006/2/1/3557>
Sorry, I haven't been keeping up on this thread. If someone could
restate the current problem I'd be happy to help.
j o a r is correct and Clark is incorrect; using an SDK usually means
"I want to have access to these calls." Setting the Mac OS X
Deployment Target build setting to a Major Version (10.2, 10.3, 10.4,
etc.) is how you say "I only care about running my app on versions of
the OS greater than or equal to this."
Setting the Deployment Target does a lot of things: it triggers weak
linking in the frameworks that support weak linking and it controls
certain compiler and linker behavior for runtime libraries. But as
documented in the Cross-Development Programming Guide, not all
libraries (especially open-source ones) support the weak-linking
features that are triggered by the Deployment Target setting, so you
mave to manage weak-linking for these manually.
These are general statements. Catch me up on the specific issue and
I'll see if I can help your std:log problem.
I've solved my
std::log10(aFloatValue)
problem by using
SDK 10.3.9 instead of SDK 10.4u
The app runs fine on 10.2.8 (so don't need to use the 10.2.8 SDK to get it
running on 10.2.8)
The problem now is that I really need to use SDK 10.4u
since I need definitions from newer CoreAudio headers that's only available
in the SDK 10.4u.
I don't explicitly use these definitions but part of my sources are from
/Developer/Examples/CoreAudio/PublicUitlity
which isn't examples only but also really good C++ helper classes written by
the CoreAudio team.
For now I put the missing enums in my prefix file (again, I don't use them
but the CoreAudio source needs them to compile OK)
This works but isn't a good solution.
What doesn't make sence to me is why things as std::log10() that's been part
of the standard C++ Library since 1999(?)
doesn't work as it should?
Same if you call some other <cmath> stuff as std::sin() with a float value
instead of a double.
I also tried to link with libstdc++.a from the 10.3.9 or 10.2.8 SDK, makes
no difference.
I'm building my app on an Intel Mac, haven't tried on my PPC with 10.4.0 SDK
instead of 10.4u
That might work??
It's easy to test thos things by just building a default Carbon application
with Xcode and then just
add say:
double dVal = std::log10(float(1.0)); // doesn't work with SDK 10.4u
double dVal = std::log10(double(1.0)); // work OK with SDK 10.4u
Thanks
Rolf
Chris
_______________________________________________
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