Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++11 Xcode 5 : linking error

Doing cocos2d-x 2.2.0 development on Xcode 5. Trying to get C++11 working, but it is getting some of linking errors. Any suggestion is greatly appreciated.

The project is on github.

Below are the C++11 configuration (stackoverflow reference). C++11 Configuration

I've linked libstdc++.6.0.9.dylib & libz.dylib libraries in addition to the default. Linked Libraries

The error build log is here. error build log

like image 406
docchang Avatar asked Oct 20 '22 21:10

docchang


1 Answers

After I changed the target to my device instead of simulator. It just worked. Can anyone explain this?

==== update ==== (11-08-2013) I also configured the cocos2dx target Language settings to c++11 like the project and did a clean build for both simulator and device for the coco2dx target ONLY. The project now builds fine. However, I wish I have an explanation for it. The latest changes have been committed it on github for future reference. Thanks for the support. Now I can move on.

In the light of cocos2dx & cross platform awesomeness, it took additional 3 lines of configuration(Application.mk) to get it work on Android. Sigh.......

Reference

Application.mk

APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -DCOCOS2D_DEBUG=1

APP_ABI    := armeabi
APP_CFLAGS := --std=c++11
NDK_TOOLCHAIN_VERSION := 4.8
like image 155
docchang Avatar answered Oct 30 '22 02:10

docchang