【发布时间】:2018-07-17 08:31:51
【问题描述】:
我使用 CMake 创建了一个框架并将其添加到测试项目中。然后导入头文件,一切正常。调用该方法时出现此错误。我不知道为什么会出现这个错误。我尝试了几乎所有可能的方法,但没有奏效。任何建议将不胜感激。
问题
Undefined symbols for architecture armv7:
"XmlInterface::XmlInterface()", referenced from:
-[ViewController viewDidLoad] in ViewController.o
"XmlInterface::~XmlInterface()", referenced from:
-[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
这些方法我都试过了
Other Linker Flags加$(inherited)删除
DerivedData将
NO设置为Active Architecture Only
lipo -info
Architectures in the fat file: xml are: x86_64 armv7 armv7s arm64
附上截图
【问题讨论】:
-
不要发布带有文字的图片,请将文字本身添加到问题帖子中。这是关于您的第一个带有错误消息的屏幕截图。
-
@Tsyvarev 谢谢你的建议,我马上修改。
标签: ios cmake shared-libraries undefined-symbol xcode9.4