Skip navigation.
 
mlWeak linking constants
FROM : Nick Zitzmann
DATE : Mon Oct 18 20:55:14 2004

On one project I'm working on I'm trying to retain backward 
compatibility with Mac OS X 10.2.x, so I've set up a test system 
running 10.2.8 and I've set up my project to use 10.2 as the deployment 
target. Unfortunately, when I run the app on the 10.2.8 system, it 
always crashes when it runs into a constant that is _supposed_ to be 
weak linked. Simply checking for the availability of the constant using 
an if statement, as described in 
<http://developer.apple.com/documentation/MacOSX/Conceptual/
BPFrameworks/Concepts/WeakLinking.html
>, is what is causing the crash 
to occur. If I take out the if statement, it still crashes whenever the 
symbol is used.

Some details:
1. The target's deployment target is set to 10.2 with no SDK (I want to 
use a handful of 10.3 symbols if they are present)
2. I've verified in the build log that "setenv MACOSX_DEPLOYMENT_TARGET 
10.2" is appearing before the linker is called
3. I'm using Xcode 1.5 and GCC 3.3 to build the target
4. ZeroLink and F&C are disabled
5. The constant it's tripping on is supposed to be weak linked (it is 
an Apple framework, and it has 
"AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER" appear on its line in the 
header)

Why is this crashing, and how do I straighten this out?

Nick Zitzmann
<http://www.chronosnet.com/>

Related mailsAuthorDate
No related mails found.