opengl-examples
opengl-examples copied to clipboard
make fails in the Linking step
I am working on a linux machine and the make command gives me an error
$ make
[ 8%] Building CXX object Examples/Window/CMakeFiles/Window.dir/main.cpp.o
[ 16%] Linking CXX executable ../../Binaries/Linux/Release/Window
/usr/bin/ld: /usr/local/lib/libglfw3.a(vulkan.c.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Examples/Window/CMakeFiles/Window.dir/build.make:102: recipe for target``'Binaries/Linux/Release/Window' failed
make[2]: *** [Binaries/Linux/Release/Window] Error 1
CMakeFiles/Makefile2:118: recipe for target 'Examples/Window/CMakeFiles/Window.dir/all' failed
make[1]: *** [Examples/Window/CMakeFiles/Window.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Hello @opheliagame, could you please provide more details about your OS and configuration? Thank you.
Hey @zuck, thank you for responding.
lsb_release -a gives the following output
Distributor ID: neon
Description: KDE neon Developer Edition
Release: 16.04
Codename: xenial
And uname -a gives:
Linux something 4.15.0-38-generic #41~16.04.1-Ubuntu SMP Wed Oct 10 20:16:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Is that okay information?
I've got this issue before are you using clang as a compiler? In my case, cmake uses clang as cpp compiler but linking only works if I select clang++. Maybe this also applies to gcc and g++