我正在为iOS项目制作构建脚本。该项目通过XCode构建;但是,使用xcodebuild命令,我得到一个奇怪的链接错误:
ld: warning: ignoring file /sw/lib//libiconv.dylib, file was built for x86_64 which is not the architecture being linked (armv7): /sw/lib//libiconv.dylib
Undefined symbols for architecture armv7:
"_iconv_open", referenced from:
l2451 in libscanditsdk-iphone-3.1.1.a(mirasense.o)
"_iconv", referenced from:
l2451 in libscanditsdk-iphone-3.1.1.a(mirasense.o)
"_iconv_close", referenced from:
l2451 in libscanditsdk-iphone-3.1.1.a(mirasense.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
搜索Google和SO尚未透露解决方案。
libiconv.dylib列在“链接二进制”框架之下。
我对这个完全感到难过。就像项目通过XCode本身编译一样
这是我用来启动构建的命令:
xcodebuild -target "${TARGET_NAME}" -sdk "${TARGET_SDK}" -configuration Release -scheme "${SCHEME_NAME}" PROVISIONING_PROFILE="${PROJ_PROF_UUID}"
答案 0 :(得分:0)
我发现要解决此问题,您已将$(继承)添加到库搜索路径。这应该在iOS SDK中搜索libiconv而不是在计算机上共享的动态库