1

我正在为 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 列在“Linked Binary”er 框架事物下。

我完全被这个难住了。就像项目确实通过 XCode 本身编译一样

这是我用来启动构建的命令:

xcodebuild -target "${TARGET_NAME}" -sdk "${TARGET_SDK}" -configuration Release -scheme "${SCHEME_NAME}" PROVISIONING_PROFILE="${PROJ_PROF_UUID}"
4

1 回答 1

0

我发现要解决此问题,您已将 $(inherited) 添加到库搜索路径。这应该搜索 iOS SDK 中的 libiconv 而不是计算机上共享的动态库

于 2014-01-03T19:29:04.783 回答