qt调用xcode写的库出错symbol(s) not found for architecture armv7

xujianxiang 2015-03-01 02:23:06
我有一个程序。是人家给的。xcode写的库,xcode的示例。运行正常。我自己有个程序用qt写的,写了很久了。现在想把这部分程序加到我的程序里。我用qt调用库出现这样的总是:
:-1: error: symbol(s) not found for architecture armv7
:-1: error: linker command failed with exit code 1 (use -v to see invocation)

Ld untitled.build/Release-iphoneos/untitled.build/Objects-normal/arm64/untitled normal arm64
cd /Users/xujianxiang/build-untitled-iphoneos_clang_Qt_5_4_0_for_iOS-Release
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/xujianxiang/build-untitled-iphoneos_clang_Qt_5_4_0_for_iOS-Release/Release-iphoneos -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks -L/Users/xujianxiang/untitled -L/Users/xujianxiang/Qt5.4.0/5.4/ios/plugins/platforms -L/Users/xujianxiang/Qt5.4.0/5.4/ios/lib -L/Users/xujianxiang/Qt5.4.0/5.4/ios/plugins/imageformats -F/Users/xujianxiang/build-untitled-iphoneos_clang_Qt_5_4_0_for_iOS-Release/Release-iphoneos -filelist /Users/xujianxiang/build-untitled-iphoneos_clang_Qt_5_4_0_for_iOS-Release/untitled.build/Release-iphoneos/untitled.build/Objects-normal/arm64/untitled.LinkFileList -dead_strip -headerpad_max_install_names -framework OpenGLES -framework UIKit -stdlib=libc++ -u _qt_registerPlatformPlugin -L/Users/xujianxiang/untitled/ -L/Users/xujianxiang/Qt5.4.0/5.4/ios/plugins/platforms -framework UIKit -L/Users/xujianxiang/Qt5.4.0/5.4/ios/lib -framework OpenGLES -L/Users/xujianxiang/Qt5.4.0/5.4/ios/plugins/imageformats -lz -lm -miphoneos-version-min=6.0 -framework OpenAL -framework AudioToolbox -framework QuartzCore -lHCNetSDK_dev_20141219 -lplayctrl -lSystemTransform -lqios -framework Foundation -framework CoreFoundation -framework CoreText -framework CoreGraphics -lQt5PlatformSupport -lQt5Widgets -lqdds -lqicns -lqico -lqjp2 -lqmng -lqtga -lqtiff -lqwbmp -lQt5Gui -lqtharfbuzzng -lQt5Core -Xlinker -dependency_info -Xlinker /Users/xujianxiang/build-untitled-iphoneos_clang_Qt_5_4_0_for_iOS-Release/untitled.build/Release-iphoneos/untitled.build/Objects-normal/arm64/untitled_dependency_info.dat -o /Users/xujianxiang/build-untitled-iphoneos_clang_Qt_5_4_0_for_iOS-Release/untitled.build/Release-iphoneos/untitled.build/Objects-normal/arm64/untitled
Undefined symbols for architecture arm64:
"std::string::at(unsigned long)", referenced from:
TiXmlElement::StreamIn(std::istream*, std::string*) in libHCNetSDK_dev_20141219.a(tinyxmlparser.o)
TiXmlComment::StreamIn(std::istream*, std::string*) in libHCNetSDK_dev_20141219.a(tinyxmlparser.o)


"std::string::compare(char const*) const", referenced from:
CXmlBase::FindElem(char const*) in libHCNetSDK_dev_20141219.a(XmlBase.o)
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:

ld: symbol(s) not found for architecture arm64
请问怎么解决这个问题
...全文
276 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
foruok 2015-03-01
  • 打赏
  • 举报
回复
用tinyxml,tinyxml是个开源的库,这个库用到了stl的东西,引用的stl库和你的目标架构(arm64)不匹配。猜测可能你的库是用32位的toolchain编译的?或者有其他不兼容你现在toolchain中stl库的东西,要问问提供你库的人了。

16,212

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧