因为我自己使用了一些第三方毕源库,那些库不支持 arm64,所以我只好用 32 位编译:
$(ARCHS_STANDARD_32_BIT)
但是在 Cocos2d-x 3.2 的项目出错:
Ld /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/xx\ iOS.app/xx\ iOS normal armv7s
cd /Users/zz/Projects/xx/proj.ios_mac
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos -F/Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos -F/Users/zz/Projects/xx/proj.ios_mac/ios -filelist /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Intermediates/xx.build/Debug-iphoneos/xx\ iOS.build/Objects-normal/armv7s/xx\ iOS.LinkFileList -dead_strip -stdlib=libc++ -fobjc-link-runtime -miphoneos-version-min=6.0 -framework MAMapKit -framework Security -framework CoreLocation -framework SystemConfiguration -lstdc++.6.0.9 -framework CoreMotion -framework UIKit -framework QuartzCore -framework CoreTelephony -framework OpenGLES /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libbox2d\ iOS.a /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libchipmunk\ iOS.a /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libcocos2dx\ iOS.a /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libcocos2dx-extensions\ iOS.a /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libCocosDenshion\ iOS.a -framework Foundation -framework CoreGraphics -lz -framework OpenAL -framework AVFoundation -framework AudioToolbox -Xlinker -dependency_info -Xlinker /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Intermediates/xx.build/Debug-iphoneos/xx\ iOS.build/Objects-normal/armv7s/xx\ iOS_dependency_info.dat -o /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/xx\ iOS.app/xx\ iOS
ld: warning: ignoring file /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libbox2d iOS.a, file was built for archive which is not the architecture being linked (armv7s): /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libbox2d iOS.a
ld: warning: ignoring file /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libchipmunk iOS.a, file was built for archive which is not the architecture being linked (armv7s): /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libchipmunk iOS.a
ld: warning: ignoring file /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libcocos2dx iOS.a, file was built for archive which is not the architecture being linked (armv7s): /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libcocos2dx iOS.a
ld: warning: ignoring file /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libcocos2dx-extensions iOS.a, file was built for archive which is not the architecture being linked (armv7s): /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libcocos2dx-extensions iOS.a
ld: warning: ignoring file /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libCocosDenshion iOS.a, file was built for archive which is not the architecture being linked (armv7s): /Users/zz/Library/Developer/Xcode/DerivedData/xx-exihagwfzcwmordimepmzurbrpjo/Build/Products/Debug-iphoneos/libCocosDenshion iOS.a
Undefined symbols for architecture armv7s:
"cocos2d::Application::setAnimationInterval(double)", referenced from:
vtable for AppDelegate in AppDelegate.o
"cocos2d::Application::getCurrentLanguage()", referenced from:
vtable for AppDelegate in AppDelegate.o
"cocos2d::Application::getTargetPlatform()", referenced from:
vtable for AppDelegate in AppDelegate.o
"cocos2d::GLView::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
AppDelegate::applicationDidFinishLaunching() in AppDelegate.o
"cocos2d::Application::Application()", referenced from:
AppDelegate::AppDelegate() in AppDelegate.o