opengl-examples icon indicating copy to clipboard operation
opengl-examples copied to clipboard

make fails in the Linking step

Open opheliagame opened this issue 7 years ago • 3 comments
trafficstars

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

opheliagame avatar Oct 30 '18 14:10 opheliagame

Hello @opheliagame, could you please provide more details about your OS and configuration? Thank you.

zuck avatar Nov 01 '18 22:11 zuck

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?

opheliagame avatar Nov 12 '18 13:11 opheliagame

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++

Tondorian avatar Feb 08 '21 10:02 Tondorian