views:

52

answers:

3

I'm having an issue while trying to link an iPhone app to use one of the static libraries that I'm working with.

The app works fine with iPhone OS 3.0, but when I try to upgrade to iOS4.0, I'm having a few issues.

The library that I'm trying to use is an universal fat which contains versions for arm and i386. Now I'm getting the "symbol(s) not found" error when I try to use this fat library. It works fine for the device(arm) but while trying to compile for Simulator(i386) I'm having issues.

The error it gives me is:

"_OBJC_CLASS_$_ClassName", referenced from: file.o
Symbol(s) not found."

Looking into the fat library (using nm) I see the symbol listed under armv6 and armv7 as type "S", and I guess that's the reason it's working fine! However, I'm not able to find the same under i386, and I've no idea why!

I do see a symbol ".objc_class_name_ClassName" listed as type "A", however the symbol which is said to be missing is not listed there.

Any ideas?

A: 

Maybe you need to build a version of the lib targeted at iOS 4.0

Lou Franco
Thanks Lou! I did rebuild all the libraries with iOS4.0 SDK.
Dhaval
A: 

A lot of libraries were broken in the move to iOS 4 and SDK 3.2.3. If you can build the library using SDK 4 and lipo it back into a fat library you'll probably be back on track.

Make sure to set your deployment target to 3.x or whatever you're planning to ship your app on.

Doug