c++ - Enable shared libraries -
on new linux distro(fedora) if try compile have written glfw following error:
:-1: error: note: 'xf86vidmodequeryextension' defined in dso /lib64/libxxf86vm.so.1 try adding linker command line
i can fix adding -lxxf86vm never had include in previous linux distros. have add 6 lib names.
what going on? seems compiler refuses .so libs? researched bit , seems have recompile gcc --enable-shared.
is true?
here log gcc:
20:32:44: running steps 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.c.o): undefined reference symbol 'xconvertselection' /usr/bin/ld: note: 'xconvertselection' defined in dso /lib64/libx11.so.6 try adding linker command line /lib64/libx11.so.6: not read symbols: invalid operation collect2: error: ld returned 1 exit status make: *** [sgl] error 1 20:32:45: process "/usr/bin/make" exited code 2. error while building/deploying project sgl (kit: desktop) when executing step 'make'
edit compiled clang -> same result.
it change in dso linking strategy of fedora, take @ official documentation.
Comments
Post a Comment