Open MagneticPrism opened 3 years ago
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?
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.
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 toglfwGetProcAddress' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to
glfwSetCharCallback' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference toglfwOpenWindowHint' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to
glfwGetMouseButton' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference toglfwTerminate' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to
glfwSetWindowCloseCallback' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference toglfwInit' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to
glfwSetWindowSize' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference toglfwSwapBuffers' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to
glfwOpenWindow' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference toglfwExtensionSupported' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference to
glfwSetMouseButtonCallback' /usr/bin/ld: ../../../lib/linux/release/libcocos2d.so: undefined reference toglfwGetMousePos' /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