Skip to content

Conversation

dcanelhas
Copy link

using the cmake variable for glfw fixes the following linking error:

Linking CXX executable ../bin/alienrain
/usr/bin/ld: cannot find -lglfw3
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/alienrain] Error 1
make[1]: *** [CMakeFiles/alienrain.dir/all] Error 2
make: *** [all] Error 2

using the cmake variable for glfw fixes the following linking error:

Linking CXX executable ../bin/alienrain
/usr/bin/ld: cannot find -lglfw3
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/alienrain] Error 1
make[1]: *** [CMakeFiles/alienrain.dir/all] Error 2
make: *** [all] Error 2
@mxncr
Copy link

mxncr commented Apr 13, 2016

Also fix the issue on Arch, thanks

@bclinthall
Copy link

This worked for me on Ubuntu. I couldn't compile without it.

@RemusRomulus
Copy link

Will try this for CentOS7

@bdaase
Copy link

bdaase commented Jan 15, 2019

Why is this not merged?

@OdairTrujillo
Copy link

Aditional to edit the line 28 with the GLFW_LIBRARIES variable inside the CMakeLists.txt file:

set(COMMON_LIBS sb7 ${GLFW_LIBRARIES} X11 Xrandr Xinerama Xi Xxf86vm Xcursor GL rt dl)

Also I had to install the following dependencies in Ubuntu 20.04:

libxi-dev
libxcursor-dev
libxinerama-dev
libxxf86vm-dev

And I had to run cmake like this:
cmake .. -DOpenGL_GL_PREFERENCE=GLVND

In order to ensure the use of the NEW policy for CMP0072 policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants