Re: HIShape symbols not found on 10.4.10 on PPC
Re: HIShape symbols not found on 10.4.10 on PPC
- Subject: Re: HIShape symbols not found on 10.4.10 on PPC
- From: Eric Schlegel <email@hidden>
- Date: Sat, 1 Dec 2007 15:53:58 -0800
On Nov 30, 2007, at 8:49 PM, Stevo Brock wrote:
I tried hitting this from a completely different direction. On
Intel / 10.5.1 / Xcode 3.0, I...
-created a new Carbon C++ project
-set the Project Deployment Target to Mac OS X 10.3
-built using the default Release configuration.
-copied the app to a PPC / 10.4.10
-ran app
-app ran fine and opened the window.
-added the following line into the source code:
HIShapeRef shapeRef = HIShapeCreateEmpty();
-rebuilt, recopied, reran
-app crashed.
There's got to be something very basic going wrong here. Can anyone
point me to what it is?
OK, I've looked into this and this is actually a problem that we need
to solve in the OS. You're not doing anything wrong. The problem is
that the HIShape symbols moved from HIToolbox to HIServices in
Leopard, and in Leopard when you link your app against
Carbon.framework, the linker performs an optimization that records a
load command in your binary that resolves the symbol to HIServices
rather than Carbon. Then when you load your app on 10.4 or earlier,
the linker can't find the HIShape symbol in HIServices.
Please file a bug about this and send me the bug number, and we'll get
started on a fix for this, but it may take a little while because I
think we'll have to update the 10.5 SDK as well. In the meantime, I
think you could work around this by using
CFBundleGetFunctionPointerForName to load function pointers to the
HIShape routines that you need, and call through the function
pointers, rather than linking statically. Make sure to ask for the
function pointer from the Carbon framework's bundle rather than the
HIServices bundle so that when running on 10.4, you can still find the
function. That's an ugly solution, but it's mechanical and not
difficult, and it should let you work around the problem.
-eric
_______________________________________________
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