Siphon 为 iOS 模拟器构建,但在设备构建时出现链接器错误

Posted

技术标签:

【中文标题】Siphon 为 iOS 模拟器构建,但在设备构建时出现链接器错误【英文标题】:Siphon builds for iOS simulator but getting linker error for device build 【发布时间】:2014-02-03 04:52:04 【问题描述】:

我是一名新手程序员,正在开发类似“虹吸”的应用程序,并正在寻找可用作实施参考的示例应用程序。我尝试了siphon open source,并且能够为 ios 模拟器成功编译它,但是当我选择为 iOS 设备(带有 iOS7 的 iPhone 5)构建它时,它无法构建,并显示链接器错误,

clang: error: linker command failed with exit code 1 (use -v to see invocation)

我不知道为什么在为设备构建时会发生此错误。我试图通过清理派生数据并再次编译来解决此问题,但仍然出现该错误。

我想为 iOS6 和 iOS 7 编译它。

需要帮助来解决此问题。

UPDATE 1:错误的完整描述如下:

Ld /Users/NST/Library/Developer/Xcode/DerivedData/Siphon-eilljtdsvklgycghnbgzfjqfpozi/Build/Products/Debug-iphoneos/Siphon.app/Siphon normal armv7s
    cd /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/NST/Library/Developer/Xcode/DerivedData/Siphon-eilljtdsvklgycghnbgzfjqfpozi/Build/Products/Debug-iphoneos -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-device/pjlib/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-device/pjlib-util/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-device/pjmedia/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-device/pjnath/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-device/pjsip/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-device/third_party/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../sim-libs -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-simulator/third_party/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-simulator/pjlib/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-simulator/pjlib-util/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-simulator/pjmedia/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-simulator/pjnath/lib -L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../pjproject-2.0-simulator/pjsip/lib -F/Users/NST/Library/Developer/Xcode/DerivedData/Siphon-eilljtdsvklgycghnbgzfjqfpozi/Build/Products/Debug-iphoneos -filelist /Users/NST/Library/Developer/Xcode/DerivedData/Siphon-eilljtdsvklgycghnbgzfjqfpozi/Build/Intermediates/Siphon.build/Debug-iphoneos/Siphon.build/Objects-normal/armv7s/Siphon.LinkFileList -dead_strip -framework Foundation -framework UIKit -fobjc-link-runtime -miphoneos-version-min=6.1 -lTelephonyIOKitDynamic -framework QuartzCore -framework CoreData -framework SystemConfiguration -framework UIKit -framework AddressBookUI -framework AddressBook -framework Foundation -framework AudioToolbox -framework CoreGraphics -lsqlite3.0 -framework CFNetwork -framework IOKit -lpj-arm-apple-darwin9 -lpjlib-util-arm-apple-darwin9 -lpjmedia-arm-apple-darwin9 -lpjmedia-audiodev-arm-apple-darwin9 -lpjmedia-codec-arm-apple-darwin9 -lpjmedia-videodev-arm-apple-darwin9 -lpjsdp-arm-apple-darwin9 -lpjnath-arm-apple-darwin9 -lpjsip-arm-apple-darwin9 -lpjsip-simple-arm-apple-darwin9 -lpjsip-ua-arm-apple-darwin9 -lpjsua-arm-apple-darwin9 -lg7221codec-arm-apple-darwin9 -lgsmcodec-arm-apple-darwin9 -lilbccodec-arm-apple-darwin9 -lmilenage-arm-apple-darwin9 -lresample-arm-apple-darwin9 -lspeex-arm-apple-darwin9 -lsrtp-arm-apple-darwin9 -lg7221codec-i686-apple-darwin9 -lgsmcodec-i686-apple-darwin9 -lilbccodec-i686-apple-darwin9 -lmilenage-i686-apple-darwin9 -lpj-i686-apple-darwin9 -lpjlib-util-i686-apple-darwin9 -lpjmedia-audiodev-i686-apple-darwin9 -lpjmedia-codec-i686-apple-darwin9 -lpjmedia-i686-apple-darwin9 -lpjmedia-videodev-i686-apple-darwin9 -lpjnath-i686-apple-darwin9 -lpjsdp-i686-apple-darwin9 -lpjsip-i686-apple-darwin9 -lpjsip-simple-i686-apple-darwin9 -lpjsip-ua-i686-apple-darwin9 -lpjsua-i686-apple-darwin9 -lportaudio-i686-apple-darwin9 -lresample-i686-apple-darwin9 -lspeex-i686-apple-darwin9 -lsrtp-i686-apple-darwin9 -Xlinker -dependency_info -Xlinker /Users/NST/Library/Developer/Xcode/DerivedData/Siphon-eilljtdsvklgycghnbgzfjqfpozi/Build/Intermediates/Siphon.build/Debug-iphoneos/Siphon.build/Objects-normal/armv7s/Siphon_dependency_info.dat -o /Users/NST/Library/Developer/Xcode/DerivedData/Siphon-eilljtdsvklgycghnbgzfjqfpozi/Build/Products/Debug-iphoneos/Siphon.app/Siphon

ld: warning: directory not found for option '-L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../sim-libs'
ld: framework not found IOKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)

更新 2:我包含 IOKit 框架,现在有更多错误,

ld: warning: directory not found for option '-L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../sim-libs'
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjlib/lib/libpj-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjlib/lib/libpj-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjlib-util/lib/libpjlib-util-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjlib-util/lib/libpjlib-util-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-videodev-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-videodev-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjsdp-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjsdp-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-codec-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-codec-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjnath/lib/libpjnath-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjnath/lib/libpjnath-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-audiodev-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjmedia/lib/libpjmedia-audiodev-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsip-ua-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsip-ua-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsip-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsip-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsua-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsua-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsip-simple-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/pjsip/lib/libpjsip-simple-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libilbccodec-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libilbccodec-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libmilenage-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libmilenage-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libg7221codec-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libg7221codec-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libspeex-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libspeex-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libsrtp-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libsrtp-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libresample-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libresample-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libgsmcodec-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libgsmcodec-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libilbccodec-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libilbccodec-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libg7221codec-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libg7221codec-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libmilenage-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libmilenage-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjlib/lib/libpj-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjlib/lib/libpj-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjlib-util/lib/libpjlib-util-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjlib-util/lib/libpjlib-util-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-codec-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-codec-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-audiodev-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-audiodev-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libgsmcodec-arm-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-device/third_party/lib/libgsmcodec-arm-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-videodev-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjmedia-videodev-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjsdp-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjmedia/lib/libpjsdp-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsip-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsip-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjnath/lib/libpjnath-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjnath/lib/libpjnath-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsip-ua-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsip-ua-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libportaudio-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libportaudio-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsua-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsua-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libresample-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libresample-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libspeex-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libspeex-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsip-simple-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/pjsip/lib/libpjsip-simple-i686-apple-darwin9.a
ld: warning: ignoring file /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libsrtp-i686-apple-darwin9.a, file was built for archive which is not the architecture being linked (armv7s): /Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/pjproject-2.0-simulator/third_party/lib/libsrtp-i686-apple-darwin9.a
Undefined symbols for architecture armv7s:
  "_pjsua_msg_data_init", referenced from:
      _sip_call_play_info_digits in dtmf.o
  "_pjsua_call_set_user_data", referenced from:
      _call_init_tonegen in dtmf.o
      _sip_call_deinit_tonegen in dtmf.o
  "_pjsua_call_dial_dtmf", referenced from:
      _sip_call_play_digits in dtmf.o
  "_pjmedia_tonegen_stop", referenced from:
      _sip_call_play_digits in dtmf.o
  "_pjsua_call_set_hold", referenced from:
      -[CallViewController setHoldEnabled:] in CallViewController.o
      -[CallViewController buttonClicked:] in CallViewController.o
  "_pjsua_conf_adjust_rx_level", referenced from:
      -[CallViewController setMute:] in CallViewController.o
  "_pjsua_call_get_max_count", referenced from:
      -[CallViewController findNextCall] in CallViewController.o
  "_pj_strdup_with_null", referenced from:
      -[CallViewController createCall:] in CallViewController.o
  "_pjsua_acc_add", referenced from:
      _sip_connect in call.o
  "_pjsua_destroy", referenced from:
      _sip_cleanup in call.o
  "_pjsip_parse_uri", referenced from:
      -[CallViewController createCall:] in CallViewController.o
  "_pjsua_conf_remove_port", referenced from:
      _sip_ring_deinit in ring.o
      _sip_call_deinit_tonegen in dtmf.o
  "_pjsua_conf_add_port", referenced from:
      _sip_ring_init in ring.o
      _call_init_tonegen in dtmf.o
  "_pjsua_call_hangup", referenced from:
      _sip_hangup in call.o
  "_pjsua_codec_set_priority", referenced from:
      _sip_manage_codec in call.o
  "_pj_log_5", referenced from:
      _sip_dial_with_uri in call.o
  "_pjsua_call_make_call", referenced from:
      _sip_dial_with_uri in call.o
  "_pj_log_3", referenced from:
      _on_mwi_info in call.o
  "_pjsua_acc_is_valid", referenced from:
      _sip_disconnect in call.o
  "_pjsua_call_get_user_data", referenced from:
      _sip_call_play_digits in dtmf.o
      _sip_call_deinit_tonegen in dtmf.o
  "_pjsua_acc_config_default", referenced from:
      _sip_connect in call.o
  "_pj_str", referenced from:
      _sip_connect in call.o
      _sip_dial_with_uri in call.o
      _sip_ring_init in ring.o
      -[CallViewController composeDTMF] in CallViewController.o
      _sip_call_play_digit in dtmf.o
      _sip_call_play_info_digit in dtmf.o
      _sip_call_play_info_digits in dtmf.o
      ...
  "_pjsua_perror", referenced from:
      _sip_connect in call.o
      _sip_dial_with_uri in call.o
      _call_init_tonegen in dtmf.o
  "_pjsua_acc_get_info", referenced from:
      _on_reg_state in call.o
  "_pjsua_call_get_info", referenced from:
      _on_call_state in call.o
      _on_call_media_state in call.o
      _on_incoming_call in call.o
      -[CallViewController timeout:] in CallViewController.o
      _call_init_tonegen in dtmf.o
  "_pjsua_create", referenced from:
      _sip_startup in call.o
  "_pj_pool_release", referenced from:
      _sip_cleanup in call.o
      -[CallViewController createCall:] in CallViewController.o
      _call_init_tonegen in dtmf.o
      _sip_call_deinit_tonegen in dtmf.o
  "_pjsua_pool_create", referenced from:
      _sip_startup in call.o
      -[CallViewController createCall:] in CallViewController.o
      _call_init_tonegen in dtmf.o
  "_pj_get_version", referenced from:
      _sip_startup in call.o
  "_pj_rand", referenced from:
      _sip_startup in call.o
  "_pjsua_logging_config_default", referenced from:
      _sip_startup in call.o
  "_pj_pool_alloc", referenced from:
      _sip_connect in call.o
  "_pjmedia_tonegen_play_digits", referenced from:
      _sip_call_play_digits in dtmf.o
  "_pj_strdup2_with_null", referenced from:
      _sip_startup in call.o
      -[CallViewController createCall:] in CallViewController.o
  "_pjsua_conf_disconnect", referenced from:
      _sip_ring_stop in ring.o
  "_pjsua_call_answer", referenced from:
      _on_incoming_call in call.o
      _sip_answer in call.o
  "_pjmedia_tonegen_create2", referenced from:
      _sip_ring_init in ring.o
  "_pj_strdup3", referenced from:
      _sip_startup in call.o
  "_pjsua_start", referenced from:
      _sip_startup in call.o
  "_pjmedia_tonegen_rewind", referenced from:
      _sip_ring_stop in ring.o
  "_pjmedia_port_destroy", referenced from:
      _sip_ring_deinit in ring.o
      _sip_call_deinit_tonegen in dtmf.o
  "_pjsua_call_get_count", referenced from:
      -[SiphonApplication processCallState:] in SiphonApplication.o
      -[SiphonApplication callDisconnecting] in SiphonApplication.o
      -[CallViewController processCall:] in CallViewController.o
  "_pjsua_media_config_default", referenced from:
      _sip_startup in call.o
  "_pjsua_transport_config_default", referenced from:
      _sip_startup in call.o
  "_pjsua_conf_connect", referenced from:
      _on_call_media_state in call.o
      _sip_ringback_start in ring.o
      _call_init_tonegen in dtmf.o
  "_pjsua_config_default", referenced from:
      _sip_startup in call.o
  "_pjsua_call_is_active", referenced from:
      -[CallViewController findNextCall] in CallViewController.o
  "_pj_log_get_level", referenced from:
      _sip_startup in call.o
      _on_call_state in call.o
      _on_incoming_call in call.o
      _on_mwi_info in call.o
      _sip_connect in call.o
      _sip_dial_with_uri in call.o
      _sip_manage_codec in call.o
      ...
  "_pjsua_transport_create", referenced from:
      _sip_startup in call.o
  "_pjsua_verify_sip_url", referenced from:
      -[SiphonApplication application:handleOpenURL:] in SiphonApplication.o
      _sip_connect in call.o
      _sip_dial_with_uri in call.o
  "_pjsua_call_reinvite", referenced from:
      -[CallViewController setHoldEnabled:] in CallViewController.o
  "_pjmedia_tonegen_play", referenced from:
      _sip_ring_init in ring.o
  "_pj_log_1", referenced from:
      _sip_startup in call.o
      _on_call_state in call.o
      _on_incoming_call in call.o
      _sip_connect in call.o
      _sip_dial_with_uri in call.o
      _sip_manage_codec in call.o
  "_pj_pool_calloc", referenced from:
      _sip_call_play_digits in dtmf.o
      _pj_pool_zalloc in dtmf.o
  "_pjsua_acc_del", referenced from:
      _sip_disconnect in call.o
  "_pjsua_call_send_request", referenced from:
      _sip_call_play_info_digits in dtmf.o
  "_pjsua_init", referenced from:
      _sip_startup in call.o
  "_pjsip_get_status_text", referenced from:
      -[SiphonApplication application:handleOpenURL:] in SiphonApplication.o
      -[SiphonApplication dialup:number:] in SiphonApplication.o
  "_pjmedia_tonegen_create", referenced from:
      _call_init_tonegen in dtmf.o
  "_pj_strerror", referenced from:
      -[SiphonApplication displayStatus:withTitle:] in SiphonApplication.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

【问题讨论】:

嘿,你有解决这个问题的办法吗?我也面临同样的问题。所以请帮我你的帮助非常适用。 是的,在 github 上搜索“idoubs”或在 Google 上搜索更多详细信息。您也可以自定义它。此外,它是开源的。 亲爱的我无法找到它。什么是“idubs”? 它是一个最新的开源项目,可以轻松组合。见code.google.com/p/idoubs 【参考方案1】:

真正的错误是这样的

ld: framework not found IOKit 

您的构建工具找不到 IOKit 框架。在 Xcode 5 中,为设备链接 IOKit 似乎存在一些问题。您可以查看this Q&A 了解解决方法。

希望有帮助!

【讨论】:

是的,你是对的。现在有更多错误。检查我现在得到的错误。我已经更新了问题。 @daemon22 看起来您也在构建 PJSIP。错误 Undefined symbols for architecture armv7s: "_pjsua_msg_data_init" 表明它不是为 armv7s 架构构建的。 @daemon22 查看支持各种架构的how to build it for iOS 上的pjsip 页面。 我是这方面的初学者。需要更多帮助。你能帮帮我吗? @daemon22 一种简单的解决方法,转到您的 Siphon 项目,在构建设置中从 Valid architecture 中删除 armv7s。这应该为 armv7 创建构建。然而,理想的解决方案是为所有受支持的架构构建 pjsip。【参考方案2】:

这是你的问题:

ld:警告:找不到选项的目录 '-L/Users/NST/Desktop/SIPHON-SIP-Client-that-actually-compiles-master/siphon/Siphon2/../../sim-libs' ld:找不到框架 IOKit clang:错误:链接器命令失败 退出代码 1(使用 -v 查看调用)

您必须解析该导向器并为框架设置正确的路径。 如果找不到该框架,则尝试构建它是没有意义的,因为即使它确实运行了,它也根本无法正常工作。

【讨论】:

好的.. 感谢您的回复。我会尝试包含该框架,但是当我在互联网上浏览 IOKit 框架时,它说 IOKit 框架是私有的,如果我使用它,应用程序将被 APPLE 拒绝。虽然我正在尝试编译的应用程序在应用商店中。 首先添加框架,如果它工作。它解决了你的问题。但它给你带来了另一个问题,并告诉你需要一个不同的框架。【参考方案3】:

出现错误的原因有很多:

1.检查临时配置文件和证书。

2.根据您的设备ios设置部署目标。

3.检查所有 .m 文件的目标成员资格。

4.如果您不使用情节提要或自动布局,请将所有 xib 与正确的插座链接,并且设备的提及代码是否为 iphone 5。

【讨论】:

我正在使用情节提要,临时配置文件和证书是正确的。你能告诉我“目标会员”到底需要做什么吗? jsut 点击任何 .m 文件(不是 appdelegate.m),然后在文件检查器中检查您是否勾选了目标成员资格。如果没有,请勾选它。 你解决了还是发给我你的代码我会解决的。 我检查过了。没有问题。我错过了包括一个框架。请检查问题。我已经更新了它,现在出现了更多错误。 如果您想查看代码,可以从我在问题中提到的链接下载。

以上是关于Siphon 为 iOS 模拟器构建,但在设备构建时出现链接器错误的主要内容,如果未能解决你的问题,请参考以下文章

为 iOS 构建,但在为 iOS 模拟器构建的目标文件中链接,用于架构 arm64

Xcode 12 beta 4:为 iOS 模拟器构建,但在为独立构建的目标文件中链接

为 iOS 模拟器构建,但在为 iOS 构建的目标文件中链接,用于架构 arm64

你如何为设备和模拟器编译 PJSip iPhone 以在 iOS 3 和 iOS 4 上使用虹吸管?

Xcode 构建在设备上运行但在模拟器上失败

iOS 设备和模拟器的构建实际上有何不同?