iphone - 创建 iOS 框架

标签 iphone ios frameworks

我正在尝试使用 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)

请告诉我我做错了什么?

谢谢

最佳答案

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

问题的最终结果是你在某处包含了这个文件两次

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

关于iphone - 创建 iOS 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17494617/

相关文章:

ios - 加载时出现 TableView 单元格大小调整/自动布局问题。但第二次重新加载后修复? - 图

iphone - iOS:加载时的设备方向

iPhone:从 subview 调用父/ super 方法

ios - 静态 UITableView 疯狂

ios - 使用 Storyboard的应用程序可以部署在不运行 iOS 5 的 iPhone 中吗

javascript - 自动向开发人员报告 javascript 错误

ios - Swift 构建错误 - 没有这样的模块 'Feature1'

xcode - 从 Xcode 6 导出自定义框架以进行分发

ios - 隐藏状态栏和导航栏位置

iphone - Glib 在 iPhone 应用程序中的使用