Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building iPhone SDK 2.x targets with Base SDK 3.0, when linking static libraries created with SDK 3.0

I'm having a problem getting Pinch Analytics r64, a static library built with iPhone SDK 3.0, to link properly in my application which is targetting iPhone OS 2.0. This seems to be a fairly common problem, and Pinch Analytics' site even has an entire page devoted to answering this question.

Basically, they say to set your project's Base SDK to 3.0 and set your iPhone OS Deployment Target to SDK 2.0 (or whatever version you're targetting). I have taken both of these steps, verified that I'm not overriding any of the project settings in my target settings, have cleaned my targets, but still I'm getting the following linker errors:

Undefined symbols:
"___restore_vfp_d8_d15_regs", referenced from: -[Beacon connectionDidFinishLoading:] in libPMAnalytics-r64.a(Beacon.o) -[Beacon connection:didFailWithError:] in libPMAnalytics-r64.a(Beacon.o)

"___save_vfp_d8_d15_regs", referenced from: -[Beacon connectionDidFinishLoading:] in libPMAnalytics-r64.a(Beacon.o) -[Beacon connection:didFailWithError:] in libPMAnalytics-r64.a(Beacon.o) -[Beacon connection:didReceiveData:] in libPMAnalytics-r64.a(Beacon.o)`

etc.

I'm coming to my wit's end here; any suggestions would be great!

like image 393
pix0r Avatar asked Jul 21 '09 23:07

pix0r


2 Answers

Check your compiler. I suspect you have a mismatch between code compiled with LLVM-GCC4.2 and GCC4.0.

like image 106
Rob Napier Avatar answered Oct 13 '22 01:10

Rob Napier


After a few emails with the Pinch Media team, the problem is solved. Basically, you should NEVER USE THE DROPDOWN TO SELECT A DIFFERENT ACTIVE SDK.

Set Base SDK to 3.0 in Project Info. Set iPhone OS Deployment Target to 2.0 (or whichever version you're targetting) in Project Info. Leave the device/configuration/target dropdown set to the Base SDK (3.0), or Xcode will use the OLD toolchain associated with the selected "Active SDK".

like image 42
pix0r Avatar answered Oct 13 '22 01:10

pix0r