cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.

Home Page:https://www.cocos.com/en/cocos2d-x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cocos2d-x 2.2.6 Linux Build Issue

MagneticPrism opened this issue · comments

commented

I am getting these issues when i run build.sh for Linux. I know i have to link against glfw but i cannot find anything at all that's useful in any way/

LINK bin/release/OrbitSimulator
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSetMousePosCallback' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSetKeyCallback'
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwGetProcAddress' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSetCharCallback'
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwOpenWindowHint' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwGetMouseButton'
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwTerminate' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSetWindowCloseCallback'
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwInit' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSetWindowSize'
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSwapBuffers' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwOpenWindow'
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwExtensionSupported' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSetMouseButtonCallback'
/usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwGetMousePos' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to glfwSetWindowTitle'
collect2: error: ld returned 1 exit status
make: *** [Makefile:17: bin/release/OrbitSimulator] Error 1

Can you share more about your setup?

What distro?

What version of gcc?

What version of cocos2d-x?

Where did you get the version (download the .zip or clone from GitHub)?

Did you use the docs to install the deps, etc?

commented

I am using Pop!_OS which is a debian/ubuntu distro but, I am using GCC v10.2.0, Cocos2d-x v2.2.6, if you're talking about where I got Cocos2d-x, I got it from https://cocos2d-x.org/cocos2dx, and I used the .sh file to install the dependencies. The issue is with GLFW and the version Cocos2d-x uses. Cocos2d-x 2.2.6 uses GLFW v2. I tried downloading and compiling the glfw-legacy repo from the GLFW github. It's a linking issue but, when I install GLFW 2 from the github repo, it doesn't really fix my issue.