On Sep 2, 2008, at 5:06 AM, Pierre Guilluy wrote:

After recompiling the libraries and minimal example using

-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4

the example works fine under 10.5 but running it under a 10.4 system
comes with a dyld error

dyld: lazy symbol binding failed: Symbol not found: _HIShapeCreateWithRect

How can I do to solve a problem like this and have an application that
uses weak linking and works on both platforms ?

This is due to a configuration error when the HIServices and HIToolbox libraries were built in Leopard. You're doing basically the right thing, but the HIShape symbols moved from the HIToolbox framework to the HIServices framework in Leopard and when you link on Leopard (even when setting the min Mac OS X version to 10.4), the linker resolves the symbol locations to HIServices and stores that as the path to the symbol, which fails on 10.4 where the symbols are actually located in HIToolbox.

We fixed the problem in HIToolbox and HIServices around 10.5.3, so one possibility is to build on 10.5.3 or 10.5.4 and in your SDK setting, link against Current Mac OS rather than 10.5 SDK.

I believe the problem was also fixed in Xcode 3.1, so you might also be able to install 3.1 and associated SDKs and link against the 10.5 SDK in that release.

-eric

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to