1

I have a OS3.1 project which now needs to be upgraded via SDK 4.0 But when I try to compile to a device runing 3.1 Im getting this linker error.

dyld: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /var/mobile/Applications/E93D0DD1-18EB-4D2E-B99E-23B74EBE42CC/RacingUK.app/RacingUK Expected in: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /var/mobile/Applications/E93D0DD1-18EB-4D2E-B99E-23B74EBE42CC/RacingUK.app/RacingUK

Base SDK is 4.0 and DeploymentTarget is 3.1. Ive seen that this likely due to Apple moving NSURL but Im not seeing any fixes that work in my case.

Any ideas?

Cheers, Neil

Neil Edwards
  • 227
  • 2
  • 3
  • 6

1 Answers1

0

This is probably yet another time where you need to weak-link a framework, in this case CoreFoundation. I describe how to do so in this answer, but to repeat:

To weak-link a framework, find your application target in Xcode, inspect it, and go to the General tab. At the bottom of that tab should be a list of frameworks, with a column for Type. Change the Type for CoreFoundation.framework from Required to Weak and rebuild your application. That should take care of the runtime errors.

Community
  • 1
  • 1
Brad Larson
  • 170,088
  • 45
  • 397
  • 571
  • Hi, Actually fixed this by changing base SDK to 4.1 (was 4.0). I was weak linking and linker was doing the correct swapping of Foundation & CoreFoundation at compile but would still error. So seems you need to use the newest BaseSDK. cheers. – Neil Edwards Sep 20 '10 at 19:09