gpt4 book ai didi

iphone - 部署目标为 7.0 时架构错误的 undefined symbol

转载 作者:IT王子 更新时间:2023-10-29 07:58:17 26 4
gpt4 key购买 nike

我在我的原生 iOS 应用程序(一堆 .a 库)中使用第三方框架。我的应用程序是使用 XCode 5 base SDK 7.0 开发的。

当部署目标为 6.1 时,库可以正常编译和链接(库和 header 搜索路径很好)。但是,当我将部署目标更改为 7.0 时,出现以下链接器错误:

Undefined symbols for architecture i386:
"std::string::find_last_of(char const*, unsigned long) const", referenced from:
GetExecutionDir(ECTemplateString<char>&, char*, bool) in myLibrary.a(moPlatForm.o)
"std::string::find(char const*, unsigned long) const", referenced from:
ParseLog(std::string const&, unsigned int&, CmoDateTime&, int&, std::string&) in myLibrary.a(AppLog.o)
"std::string::size() const", referenced from:
mo::CmoParam::WriteToStream(void*, mo::STREAM_STATE*) in myLibrary.a(moParams.o)
"std::string::c_str() const", referenced from:
GetExecutionDir(ECTemplateString<char>&, char*, bool) in myLibrary.a(moPlatForm.o)
CMocaFileTransfer::UpdateParamsForGetTraceFiles(mo::CmoParamList&, long) in myLibrary.a(RobieFileTransfer.o)
CMocaFileTransfer::AddTraceFileForUpload(std::string const&, std::string const&) in myLibrary.a(RobieFileTransfer.o)
CMocaFileTransfer::CreateParamsForSendTraceFiles(mo::CmoObject&) in myLibrary.a(RobieFileTransfer.o)
mo::CmoParam::WriteToStream(void*, mo::STREAM_STATE*) in myLibrary.a(moParams.o)
ParseLog(std::string const&, unsigned int&, CmoDateTime&, int&, std::string&) in myLibrary.a(AppLog.o)
CAppLog::LogExists(unsigned int) in myLibrary.a(AppLog.o)
...

库有点旧,我不确定是否存在兼容性问题。我不打算支持 iOS 6,所以我需要将部署目标设置为 7.0。任何形式的帮助/指导都会很棒。

最佳答案

对我来说,将“stdc++.6.0.9.dylib”而不是“stdc++.dylib”包含到依赖项中也解决了链接器错误

关于iphone - 部署目标为 7.0 时架构错误的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19271856/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com