令人沮丧的iPhone构建错误

令人沮丧的iPhone构建错误,第1张

概述我现在已经打了几个小时了,我已经厌倦了.我的项目可以通过调试模拟器构建,发布模拟器构建和调试设备构建来构建,但由于某种原因,它不会使用发布设备构建构建.我有一个包含我的cocos2d代码的静态库,以及另一个包含我编写的游戏引擎的静态库. 因为游戏引擎包含类别,所以我不得不使用all_load链接器标志来运行它.没有这个标志,代码构建正常.但是,当我尝试运行游戏时,我收到一个无法识别的选择器发送到实 我现在已经打了几个小时了,我已经厌倦了.我的项目可以通过调试模拟器构建,发布模拟器构建和调试设备构建来构建,但由于某种原因,它不会使用发布设备构建构建.我有一个包含我的cocos2d代码的静态库,以及另一个包含我编写的游戏引擎的静态库.

因为游戏引擎包含类别,所以我不得不使用all_load链接器标志来运行它.没有这个标志,代码构建正常.但是,当我尝试运行游戏时,我收到一个无法识别的选择器发送到实例异常.

这是第一个构建错误

ld: duplicate symbol _OBJC_CLASS_$_FontLabel in /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o) and /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o)Ld build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv6/Shapeless normal armv6cd /Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapelesssetenv IPHONEOS_DEPLOYMENT_TARGET 4.0setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -L/Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -F/Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -fileList /Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv6/Shapeless.linkfileList -dead_strip -ObjC -all_load -miphoneos-version-min=4.0 /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libChipmunk.a /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a /Users/helixed/DropBox/documents/Development/iPhone/BlackHawk/build/Release-iphoneos/libBlackHawk.a -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AVFoundation -framework AudioToolBox -lz -framework iAd -o /Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv6/Shapelessld: duplicate symbol _OBJC_CLASS_$_FontLabel in /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o) and /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o)collect2: ld returned 1 exit statusCommand /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 Failed with exit code 1

这是第二个:

Ld build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv7/Shapeless normal armv7cd /Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapelesssetenv IPHONEOS_DEPLOYMENT_TARGET 4.0setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -L/Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -F/Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Release-iphoneos -fileList /Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv7/Shapeless.linkfileList -dead_strip -ObjC -all_load -miphoneos-version-min=4.0 /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libChipmunk.a /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a /Users/helixed/DropBox/documents/Development/iPhone/BlackHawk/build/Release-iphoneos/libBlackHawk.a -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AVFoundation -framework AudioToolBox -lz -framework iAd -o /Users/helixed/DropBox/documents/Development/iPhone/Apps/Shapeless/build/Shapeless.build/Release-iphoneos/Shapeless.build/Objects-normal/armv7/Shapelessld: duplicate symbol _OBJC_CLASS_$_FontLabel in /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o) and /Users/helixed/DropBox/documents/Development/iPhone/Cocos2d/build/Release-iphoneos/libcocos2d.a(FontLabel.o)collect2: ld returned 1 exit statusCommand /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 Failed with exit code 1

这是阻止我发布的唯一想法,所以我非常感谢你的帮助.

谢谢.

解决方法 我遇到了类似的问题,我不小心包含了(#import)实现文件而不是头文件

当编译器抛出2个目标文件包含重复符号的错误时,请检查您在2个实现文件中如何包含(#import)该重复符号的类.

总结

以上是内存溢出为你收集整理的令人沮丧的iPhone构建错误全部内容,希望文章能够帮你解决令人沮丧的iPhone构建错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1002574.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存