Xcode交叉编译cocos2d错误

时间:2011-07-23 12:48:39

标签: xcode cocos2d-iphone cross-compiling

当我尝试为模拟器或真实设备编译我的项目时,我收到了以下错误:

Ld /Users/maumau/Library/Developer/Xcode/DerivedData/HarvestMoon-bciczopagtmfyqgxjxasrffzrnls/Build/Products/Debug-iphoneos/HarvestMoon.app/HarvestMoon normal armv7
cd /Users/maumau/Dropbox/Daten/Projekte/HMiOS
setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
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/clang -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/maumau/Library/Developer/Xcode/DerivedData/HarvestMoon-bciczopagtmfyqgxjxasrffzrnls/Build/Products/Debug-iphoneos -L/Users/maumau/Dropbox/Daten/Projekte/HMiOS/../../../../Library/Developer/Xcode/DerivedData/HarvestMoon-bciczopagtmfyqgxjxasrffzrnls/Build/Products/Debug-iphoneos -F/Users/maumau/Library/Developer/Xcode/DerivedData/HarvestMoon-bciczopagtmfyqgxjxasrffzrnls/Build/Products/Debug-iphoneos -filelist /Users/maumau/Library/Developer/Xcode/DerivedData/HarvestMoon-bciczopagtmfyqgxjxasrffzrnls/Build/Intermediates/HarvestMoon.build/Debug-iphoneos/HarvestMoon.build/Objects-normal/armv7/HarvestMoon.LinkFileList -dead_strip -ObjC -framework Foundation -framework UIKit -miphoneos-version-min=4.3 /Users/maumau/Library/Developer/Xcode/DerivedData/HarvestMoon-bciczopagtmfyqgxjxasrffzrnls/Build/Products/Debug-iphoneos/libbox2d.a -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/maumau/Library/Developer/Xcode/DerivedData/HarvestMoon-bciczopagtmfyqgxjxasrffzrnls/Build/Products/Debug-iphoneos/HarvestMoon.app/HarvestMoon

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_CCRepeatForever", referenced from:
  objc-class-ref in KBPlayer.o
"_OBJC_METACLASS_$_CCTMXTiledMap", referenced from:
  _OBJC_METACLASS_$_KBTMXTiledMap in KBTMXTiledMap.o
"_OBJC_CLASS_$_CCDirector", referenced from:
.... more errors ....

ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我使用Xcode 4.2和cocos2d-1.0。有没有人有一个想法,我怎么能解决这个问题?

1 个答案:

答案 0 :(得分:0)

您最好确保您的项目包含cocos2d源代码或cocos2d静态库。如果您使用的是cocos2d静态库,则必须为armv7编译。

您的项目基于cocos2d application template