I am using OpenSuse 13.1, all necessary dependencies installed, cocos2dx version is 3.2 (stable). And installing/launching cpp-tests for Android (via terminal) works like a charm, no problems at all. But now
I want to use it for desktop.
cd COCOS2DX_HOME
mkdir opensuse_build
cd opensuse_build
cmake …
– The C compiler identification is GNU 4.8.1
– The CXX compiler identification is GNU 4.8.1
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
Using chipmunk …
– Configuring done
– Generating done
– Build files have been written to: /home/username/DevTools/Cocos2dx/cocos2dx/cocos2d-x-3.2/opensuse_build
make
…
[ 11%] Built target xxhash
Scanning dependencies of target audio
[ 11%] Building CXX object cocos/audio/CMakeFiles/audio.dir/linux/SimpleAudioEngineFMOD.cpp.o
In file included from /home/username
/DevTools/Cocos2dx/cocos2dx/cocos2d-x-3.2/cocos/cocos2d.h:211:0,
from /home/username
/DevTools/Cocos2dx/cocos2dx/cocos2d-x-3.2/cocos/audio/linux/SimpleAudioEngineFMOD.cpp:29:
/home/username
/DevTools/Cocos2dx/cocos2dx/cocos2d-x-3.2/cocos/platform/desktop/CCGLView.h:32:19: fatal error: glfw3.h: No such file or directory
#include “glfw3.h”
^
compilation terminated.
make[2]: *** [cocos/audio/CMakeFiles/audio.dir/linux/SimpleAudioEngineFMOD.cpp.o] Error 1
make[1]: *** [cocos/audio/CMakeFiles/audio.dir/all] Error 2
make: *** [all] Error 2
I’ve used this tutorial http://stackoverflow.com/questions/17768008/how-to-build-install-glfw-3-and-use-it-in-a-linux-project, looked at install-deps-linux.sh script, some other considerations and compiled and properly installed glfw3 - I am 100% sure here as I double chacked everything twice. After installing glfw3 I’ve launched make again.
make
…
here goes a lot of output from building process
…
Linking CXX static library …/…/…/lib/libluabinding.a
[ 72%] Built target luabinding
Scanning dependencies of target cpp-empty-test
[ 72%] Building CXX object tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/proj.linux/main.cpp.o
…
Linking CXX executable …/…/bin/cpp-empty-test/cpp-empty-test
/usr/lib64/gcc/x86_64-suse-linux/4.8/…/…/…/…/x86_64-suse-linux/bin/ld: cannot find -lglfw
collect2: error: ld returned 1 exit status
make[2]: *** [bin/cpp-empty-test/cpp-empty-test] Error 1
make[1]: *** [tests/cpp-empty-test/CMakeFiles/cpp-empty-test.dir/all] Error 2
make: *** [all] Error 2
And that’s all, I don’t know what should I do next. Any ideas ?