Projects > cpp > Issues > Bug #3701

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Cocos2d-x 3.0 beta - Linux build script fails with undefined references to glfw functions

Bug #3701 [Closed]
MrFibre 2014-01-14 22:09 . Updated about 2 years ago

Create a project using create_project.py on Linux, navigate to that projects proj.linux folder and run the build.sh script. It will fail with this output:

lib/libcocos2d.a(CCEGLView.cpp.o): In function `cocos2d::EGLView::EGLView()‘:
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:312: undefined reference to `glfwSetErrorCallback’
lib/libcocos2d.a(CCEGLView.cpp.o): In function `cocos2d::EGLView::init(char const**, float, float, float)‘:
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:330: undefined reference to `glfwWindowHint’
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:331: undefined reference to `glfwCreateWindow’
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:332: undefined reference to `glfwMakeContextCurrent’
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:334: undefined reference to `glfwGetFramebufferSize’
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:337: undefined reference to `glfwSetCursorPosCallback’
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:338: undefined reference to `glfwSetScrollCallback’
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:341: undefined reference to `glfwSetWindowPosCallback’
lib/libcocos2d.a: In function `cocos2d::EGLView::end‘:
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:402: undefined reference to `glfwSetWindowShouldClose’
lib/libcocos2d.a: In function `cocos2d::EGLView::windowShouldClose‘:
/home/vaio/Documents/Dev/MyProject/cocos2d/cocos/2d/platform/linux/CCEGLView.cpp:414: undefined reference to `glfwWindowShouldClose’
collect2: error: ld returned 1 exit status
make[2]:***** Error 1
make[1]:***** Error 2
make:**** [all] Error 2

This happens with Cocos2d-x 3.0 beta and the GitHub develop branch as of yesterday, although looking at the commit log, I don’t think anything would have changed this issue.

Jarod Liu says to have found a fix on the forums, although I haven’t tested it: http://www.cocos2d-x.org/forums/6/topics/42503

I’m running Linux Mint 16 and gcc 4.8.1. I have run the dependency installation script.

walzer@cocos2d-x.org 2014-10-08 02:56

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8314

Atom PDF

Status:Closed
Start date:2014-01-14
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:linux
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.