我不知道如何解决这个错误。
有谁能告诉我解决方案吗?
Ld /Users/BSE-Pothi/Library/Developer/Xcode/DerivedData/SHY-bvernmxskqctscfrkgfpzjxkwywb/Build/Products/Debug-iphonesimulator/SHY.app/SHY normal i386
cd /Users/BSE-Pothi/Desktop/SHY
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/BSE-Pothi/Library/Developer/Xcode/DerivedData/SHY-bvernmxskqctscfrkgfpzjxkwywb/Build/Products/Debug-iphonesimulator -F/Users/BSE-Pothi/Library/Developer/Xcode/DerivedData/SHY-bvernmxskqctscfrkgfpzjxkwywb/Build/Products/Debug-iphonesimulator -filelist /Users/BSE-Pothi/Library/Developer/Xcode/DerivedData/SHY-bvernmxskqctscfrkgfpzjxkwywb/Build/Intermediates/SHY.build/Debug-iphonesimulator/SHY.build/Objects-normal/i386/SHY.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/BSE-Pothi/Library/Developer/Xcode/DerivedData/SHY-bvernmxskqctscfrkgfpzjxkwywb/Build/Intermediates/SHY.build/Debug-iphonesimulator/SHY.build/Objects-normal/i386/SHY_dependency_info.dat -o /Users/BSE-Pothi/Library/Developer/Xcode/DerivedData/SHY-bvernmxskqctscfrkgfpzjxkwywb/Build/Products/Debug-iphonesimulator/SHY.app/SHY
Undefined symbols for architecture i386:
"_aspectFit", referenced from:
-[BSE_Add_Pro renderPageAtIndex:inContext:] in BSE_Add_Pro.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:1)
您最有可能在您的应用中使用没有模拟器编译组件的框架/库。
当您为模拟器构建时,您的应用程序将针对i386架构进行编译(如果您使用的是64位,则为x86_64)。这意味着您使用的任何库或框架必须在其二进制编译版本中包含您希望构建的每个体系结构的包含。
找到符号所在的框架并在终端中运行此命令:
lipo -i /path/to/framerwork/binary
它将打印出编译成该二进制文件的体系结构。如果不包含i386,您将无法在模拟器中使用它。如果它是你的框架,你可以为模拟器重新编译它并创建一个' fat'包含ARM和i386二进制文件的二进制文件。如果它不是您的框架,那么您必须向经销商询问适用于模拟器的版本。