How to compile cocos2d-x using mingw32 and QtCreator on Windows¶
Contributed By: Meir Yanovich
What does this tutorial solve?
- As of today there is no support for true cross compiling. That is to say the option to compile in one IDE and one compiler across all operating systems. Developers love compilers and IDE's other than Visual Studio. Although Visual Studio is great IDE there are other compiler and IDE options available for free to less cost.
- Aims to simplify the option to port the Framework ot other platforms.
- compile external libraries dependencies for mingw32 on Windows.
Setting up the tools¶
- Download Qt 5.3 the version that bundled with mingw for windows
- Qt mirror site download - Qt 5.3 mirrors site download
- External libraries used by Cocos2d-x 3.1 - External libraries used by Cocos2d-x 3.1 , source code and compiled statically using mingw32
- Modified cocos2d-x CMakeLists.txt Modified cocos2d-x CMakeLists.txt it experimental to support mingw compilation in windows 7
Download cocod2d-x for windows , extract it.
open cocos2d-x-3.1\external\ directory , now in some directory's there is a need to create new
directory for the new prebuild libraries called "mingw32"
the list of the places :
Extract the cocos2d-x_external_lib_src.zip from my github . and copy only the static libiraris
to the new created mingw32 directorys
so it will look like this :
rename in cocos2d-x root folder the CMakeLists.txt to CMakeLists.txt.tmp
and copy the Experimental CMakeLists.txt from my github you download in step 1
As instructed in this tutorial:
- User Tutorial-How to open cocos2d-x project into Qt Creator IDE - Linux User Tutorial-How to open cocos2d-x project into Qt Creator IDE
The difference is that now it compiled also in windows 7
Thank you for your time and happy development !