I'm new to cocos2d-x platform and tried to run the tests on Linux(Ubuntu 13.04) environment.
I have followed the steps from git-cocos2d-x and got the following error while executing
cocos run -p linux
command.
/usr/bin/ld: cannot find -lglfw collect2: error: ld returned 1 exit status
Can anybody tell me how to fix this error ?
Any help would be appreciable.
After installation I got the following errors
lib/libcocos2d.a(CCGLView.cpp.o): In function `cocos2d::GLView::GLView()':
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:275: undefined reference to `glfwSetErrorCallback'
lib/libcocos2d.a(CCGLView.cpp.o): In function `cocos2d::GLView::initWithRect(std::string const&, cocos2d::Rect, float)':
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:337: undefined reference to `glfwWindowHint'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:343: undefined reference to `glfwCreateWindow'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:344: undefined reference to `glfwMakeContextCurrent'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:347: undefined reference to `glfwSetCursorPosCallback'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:348: undefined reference to `glfwSetScrollCallback'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:351: undefined reference to `glfwSetWindowPosCallback'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:352: undefined reference to `glfwSetFramebufferSizeCallback'
lib/libcocos2d.a(CCGLView.cpp.o): In function `cocos2d::GLView::initWithFullScreen(std::string const&)':
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:381: undefined reference to `glfwGetPrimaryMonitor'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:385: undefined reference to `glfwGetVideoMode'
lib/libcocos2d.a(CCGLView.cpp.o): In function `cocos2d::GLView::initWithFullscreen(std::string const&, GLFWvidmode const&, GLFWmonitor*)':
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:397: undefined reference to `glfwWindowHint'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:398: undefined reference to `glfwWindowHint'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:399: undefined reference to `glfwWindowHint'
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:400: undefined reference to `glfwWindowHint'
lib/libcocos2d.a(CCGLView.cpp.o): In function `cocos2d::GLView::end()':
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:414: undefined reference to `glfwSetWindowShouldClose'
lib/libcocos2d.a(CCGLView.cpp.o): In function `cocos2d::GLView::windowShouldClose()':
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:430: undefined reference to `glfwWindowShouldClose'
lib/libcocos2d.a(CCGLView.cpp.o): In function `cocos2d::GLView::updateFrameSize()':
cocos2d-x/NTT-Game/MyGame/cocos2d/cocos/platform/desktop/CCGLView.cpp:489: undefined reference to `glfwGetFramebufferSize'
Do you have libglfw installed on system? Since version 3 of that library the link flag is -lglfw3