PJSip on iOS and -ObjC -all_load...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've recently been working on using pjsip on iOS. I have successfully added the library to my project, built my application, and tested it. So far, everything has worked great. Thanks for the excellent tool.

Unfortunately, I have found that when it comes to adding additional static libraries to my project, there seems to be some kind of conflict with the pjsip library.

Specifically, whenever I add the flags -ObjC and -all_load to my linker flags (these allow third-party static libraries to load Objective-C categories contained within them) I then get the following error when I try to build my project:

	Undefined symbols for architecture i386:
 	".objc_class_name_AVCaptureDevice", referenced from:
     	pointer-to-literal-objc-class-name in libpjmedia-videodev-arm-apple-darwin9.a(ios_dev.o)

I get a bunch of these... all for various system frameworks...

To be clear: 

I am linking with AVFoundation and all the other frameworks in the errors.

The ONLY thing that changes to cause this error is adding the -ObjC and -all_load flags.

I posted this question to the Apple LLVM forum, and received the following response from Greg Parker:

 	"Your static archive was built incorrectly. (In this error, ios_dev.o from libpjmedia-videodev-arm-apple-darwin9.a specifically.)

 	"The static archive was built for 32-bit OS X, which is not compatible with 32-bit iOS simulator. You should check the build settings for the static archive."

Unfortunately, he didn't give me any additional information about how I would fix this in the build scripts.  

I'm not actually 100% sure that he is correct, because the problem doesn't just occur when building for the simulator. It also occurs when building for the device.

Note: To reproduce the problem, you do not actually have to link with a third-party library, all you have to do is add those flags to your build settings in your iOS project.

Can anyone help me to resolve this problem?

Thanks in advance!
--
Jiva DeVoe
http://www.random-ideas.net
iZen Garden & Edibles - iPhone software for your mind and body.




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux