我尝试使用This Guide创建iOS Framework
。我以与教程中提到的相同的方式完成了所有的事情,但现在当我尝试将该框架用于我的示例项目时,我收到以下错误。
Ld /Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator/TestingFramework.app/TestingFramework normal i386
cd /Users/Ankur/Desktop/TestingFramework
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv 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/iPhoneSimulator6.1.sdk -L/Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator -F/Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator -F/Users/Ankur/Desktop/TestingFramework/../Test/Products -filelist /Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Intermediates/TestingFramework.build/Debug-iphonesimulator/TestingFramework.build/Objects-normal/i386/TestingFramework.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework TestFramework -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/Ankur/Library/Developer/Xcode/DerivedData/TestingFramework-eaowfdnjkurezghccwfwtnmftxig/Build/Products/Debug-iphonesimulator/TestingFramework.app/TestingFramework
duplicate symbol _NXArgc in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol _NXArgv in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol ___progname in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol _environ in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
duplicate symbol start in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.o
/Users/Ankur/Desktop/Test/Products/TestFramework.framework/TestFramework
ld: 5 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
请告诉我,我做错了什么?
由于
答案 0 :(得分:1)
您是否可能在某处使用#include而不是#import?
问题的最终结果是你在某个地方包含了这个文件