Page 1 of 1

Setting up cocos2d-x on Ubuntu

PostPosted: Wed Sep 02, 2015 9:16 pm
by djkoloski
Having problems setting up cocos2d-x on Ubuntu or another linux distribution? Here are some of the problems I ran into:

- When building cocos2d-x or a game using cocos2d-x, your path cannot contain spaces
- You must remove glfw2! Run
Code: Select all
apt-get purge glfw glfw-dev
and install from source. The github repo is at https://github.com/glfw/glfw, just
Code: Select all
cmake .
then
Code: Select all
make
then
Code: Select all
sudo make install

- You might also have to copy the glfw3 libs. This seems to be a CMake problem that hasn't been fixed because it went away in later versions apparently: http://discuss.cocos2d-x.org/t/wrong-cmake-files/22049. To fix, run
Code: Select all
cp /usr/local/lib/libglfw3.a /usr/lib/libglfw3.a


If you run into problems, I'll try to help. :)

David K