Is CLion supposed to work with Cocos2d-x?

I tried CLion with Hello World on Mac compiled for macOS with Cocos2d-x 3.13 and first I got Linker errors because of glfw3 missing and after adding glfw3 manually I got even more Linker errors. I installed the GitHub v3 version and this fixed the linker errors (after I added glfw3 again) and it compiles fine, but it crashes hard with EXC_BAD_ACCESS (code=1, address=0x0).

Is CLion even supposed to work at all with Cocos2d-x, or is Cocos2d-x supposed to be exclusively XCode on Mac?

We don’t support it, but others have gotten AppCode to work. Search here for AppCode there was a recent discussion about it.

AppCode works pretty well with Cocos 3.13.x though, at the time of writing, it has some C++ parsing bugs remaining. Make sure you set up the base SDKs for each of the cocos library projects in XCode.

CLion works a bit better but you need to tweak the CMakeLists for the macOS target at least (I didn’t check any others).

Just out of curiosity, is there a reason why Cocos2d-x does not support a professional cross platform IDE out of the box?

Would be a huge plus for development, wouldn’t it?

1 Like