Cocos2dx 2.x adapts to the latest XCode 12

1. The reference method of the 'string' file not found     library has changed.    
In the Build Setting of the cocos2dx project, the C++ Standard Library has been changed to libc++

Change the C++ Standard Library to libc++ in the game project Build Setting

2.Use of '@import' when C++ modules are disabled   AppController.mm refers to the pod library and reports an error 

Enable Moudles in build settings, change to yes

Change AppController.mm to AppController.m

If there is C++ code in AppControll.mm, it is recommended to write a separate .m file to @import


3.does not contain bitcode.   bitcode does not support    

Two projects set Enable Bitcode to No  

  
4. Execute the latest ios mobile phone and report an error.     The latest is arm64    

Modify VALID_ARCHS in User-Defined under Build Settings, add arm64     

Guess you like

Origin blog.csdn.net/qq_35624156/article/details/129045964