In my new linux distribution (Fedora), if I try to compile something that I wrote with glfw, I get the following error:
:-1: error: note: 'XF86VidModeQueryExtension' is defined in DSO /lib64/libXxf86vm.so.1 so try adding it to the linker command line
I can fix this by adding -lXxf86vm, but I never had to include this in previous linux distributions. Now I have to add 6 lib names.
What's happening? Does my compiler seem to give up .so libs? I studied this a bit, and it seems to me that I need to recompile my gcc using --enable-shared.
It's true?
Here is my gcc log:
20:32:44: Running steps for project sgl... 20:32:44: Configuration unchanged, skipping qmake step. 20:32:44: Starting: "/usr/bin/make" g++ -c -m64 -pipe -std=c++11 -g -Wall -W -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -I../../Qt5.0.2/5.0.2/gcc_64/mkspecs/linux-g++-64 -I../kantaki-sgl -Ishaders -I. -o camera.o ../kantaki-sgl/camera.cpp ../kantaki-sgl/camera.cpp:3:6: warning: unused parameter 'pos' [-Wunused-parameter] ../kantaki-sgl/camera.cpp:7:6: warning: unused parameter 'ori' [-Wunused-parameter] ../kantaki-sgl/camera.cpp:14:6: warning: unused parameter 'window' [-Wunused-parameter] ../kantaki-sgl/camera.cpp:14:6: warning: unused parameter 'action' [-Wunused-parameter] g++ -m64 -Wl,-rpath,/home/maik/Qt5.0.2/5.0.2/gcc_64 -o sgl main.o filereader.o shader.o camera.o -lGL -lglfw3 -lglimgD -lglloadD /usr/bin/ld: /usr/local/lib/libglfw3.a(x11_clipboard.co): undefined reference to symbol 'XConvertSelection' /usr/bin/ld: note: 'XConvertSelection' is defined in DSO /lib64/libX11.so.6 so try adding it to the linker command line /lib64/libX11.so.6: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make: *** [sgl] Error 1 20:32:45: The process "/usr/bin/make" exited with code 2. Error while building/deploying project sgl (kit: Desktop) When executing step 'Make'
Edit I also compiled it with clang -> the same result.
source share