我正在为使用C ++和Objective-C ++代码的iOS 7软件构建一个静态库。
尝试在与C ++相同的库中放入Objective-C ++(。mm)会在链接时出现以下错误:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_XYZ", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_Thisissomefunc", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
这是否可能,或者我应该将obj-c ++与c ++分开并使用两个静态库?
谢谢