重复符号链接器错误 XCode 3.2.5 - 链接器似乎以不同方式引用同一文件
我收到以下错误:
ld:重复符号 /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o) 中的 _TTCreateNonRetainingArray 和 ../two20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o) Collect2: ld 返回 1 退出状态 命令 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 失败,退出代码为 1
它似乎从绝对和相对路径引用相同的 .o 。
LD 构建/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ 普通armv6光盘 /用户/macuser/Dropbox/DFJ/DFJ setenv IPHONEOS_DEPLOYMENT_TARGET 3.2 设置环境 小路 “/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin” /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/macuser/Dropbox/DFJ/DFJ/build/Debug-iphoneos -F/Users/macuser/Dropbox/DFJ/DFJ/build/Debug-iphoneos -F/Users/macuser/Dropbox/DFJ/DFJ/../../../Downloads/gdata-objectivec-client-1.11.0/Source/build/Debug -filelist /Users/macuser/Dropbox/DFJ/DFJ/build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ.LinkFileList -dead_strip -force_load ../third20/Build/Products/Debug-iphoneos/libThree20Core.a -force_load ../third20/Build/Products/Debug-iphoneos/libThree20UICommon.a -force_load ../third20/Build/Products/Debug-iphoneos/libThree20Launcher.a -force_load ../third20/Build/Products/Debug-iphoneos/libThree20UINavigator.a -force_load ../third20/Build/Products/Debug-iphoneos/libThree20.a -force_load ../third20/Build/Products/Debug-iphoneos/libThree20UI.a -force_load ../third20/Build/Products/Debug-iphoneos/libThree20Network.a -force_load ../third20/Build/Products/Debug-iphoneos/libThree20Style.a -all_load -miphoneos-version-min=3.2 /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20Core.a /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20UICommon.a /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20Launcher.a /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20UINavigator.a /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20.a /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20UI.a /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20Network.a /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20Style.a -framework QuartzCore -framework Foundation -framework UIKit -framework CoreGraphics-lsqlite3.0-framework MobileCoreServices -lxml2 -framework 安全框架 系统配置-OpenAL框架 -framework CoreAudio -framework AudioToolbox -o /Users/macuser/Dropbox/DFJ/DFJ/build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ
ld:重复符号 /Users/macuser/Dropbox/DFJ/third20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o) 中的 _TTCreateNonRetainingArray 和 ../two20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o) Collect2: ld 返回 1 退出状态 命令 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 失败,退出代码为 1
I get the following error:
ld: duplicate symbol
_TTCreateNonRetainingArray in /Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o)
and
../three20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o)
collect2: ld returned 1 exit status
Command
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2
failed with exit code 1
It seems to be referring to the same .o from an absolute and relative paths.
Ld
build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ
normal armv6 cd
/Users/macuser/Dropbox/DFJ/DFJ setenv
IPHONEOS_DEPLOYMENT_TARGET 3.2 setenv
PATH
"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2
-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
-L/Users/macuser/Dropbox/DFJ/DFJ/build/Debug-iphoneos
-F/Users/macuser/Dropbox/DFJ/DFJ/build/Debug-iphoneos
-F/Users/macuser/Dropbox/DFJ/DFJ/../../../Downloads/gdata-objectivec-client-1.11.0/Source/build/Debug
-filelist /Users/macuser/Dropbox/DFJ/DFJ/build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJ.LinkFileList
-dead_strip -force_load ../three20/Build/Products/Debug-iphoneos/libThree20Core.a
-force_load ../three20/Build/Products/Debug-iphoneos/libThree20UICommon.a
-force_load ../three20/Build/Products/Debug-iphoneos/libThree20Launcher.a
-force_load ../three20/Build/Products/Debug-iphoneos/libThree20UINavigator.a
-force_load ../three20/Build/Products/Debug-iphoneos/libThree20.a
-force_load ../three20/Build/Products/Debug-iphoneos/libThree20UI.a
-force_load ../three20/Build/Products/Debug-iphoneos/libThree20Network.a
-force_load ../three20/Build/Products/Debug-iphoneos/libThree20Style.a
-all_load -miphoneos-version-min=3.2 /Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20Core.a
/Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20UICommon.a
/Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20Launcher.a
/Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20UINavigator.a
/Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20.a
/Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20UI.a
/Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20Network.a
/Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20Style.a
-framework QuartzCore -framework Foundation -framework UIKit -framework
CoreGraphics -lsqlite3.0 -framework
MobileCoreServices -lxml2 -framework
Security -framework
SystemConfiguration -framework OpenAL
-framework CoreAudio -framework AudioToolbox -o
/Users/macuser/Dropbox/DFJ/DFJ/build/DFJ.build/Debug-iphoneos/DFJ.build/Objects-normal/armv6/DFJld: duplicate symbol
_TTCreateNonRetainingArray in /Users/macuser/Dropbox/DFJ/three20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o)
and
../three20/Build/Products/Debug-iphoneos/libThree20Core.a(TTGlobalCore.o)
collect2: ld returned 1 exit status
Command
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2
failed with exit code 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请在此处查看 Three20 开发者的最后一条消息。基本上,下载最新的 Three20 源代码并严格按照其 README。
如果您正在遵循的 Three20 教程不是来自开发人员,那么它很可能已经过时了。
See the last message of the developer of Three20 here. Basically, download the newest Three20 sources and follow closely the steps described in their README.
If you are following a Three20 tutorial that is not coming from the developer, chances are it's outdated.