3

我试图Framework使用This Guide创建一个 iOS 。我按照教程中提到的相同方式完成了所有操作,但是现在当我尝试将该框架用于我的示例项目时,我收到了以下错误。

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)

请告诉我我做错了什么?

谢谢

4

1 回答 1

1

您是否可能在某处使用#include 而不是#import?

问题的最终结果是您在某处包含此文件两次

http://iphone-dev.googlecode.com/svn/trunk/csu/crt.c

于 2013-08-16T19:33:56.453 回答