Important: Please read the Qt Code of Conduct -

incompatible /usr/lib/

  • Hello,
    building default QT Widgets Application on a fresh setup of Qt 5.6.1. GCC64bit on OpenSuse 42.1 Leap results in following error messages:

    :-1: error: skipping incompatible /usr/lib/ when searching for -lGL
    :-1: error: cannot find -lGL

    locations of are:

    1.   /usr/X11R6/lib/
    2.   /usr/X11R6/lib64/
    3.   /usr/lib/
    4.   /usr/lib64/

    I assume the 3rd one is found first but the 4th should be found.
    How to fix this in Qt-creator 4.0.1. ?
    The Makefile contains:

    LFLAGS        = -Wl,-rpath,/opt/Qt5/5.6/gcc_64/lib
    LIBS          = $(SUBLIBS) -L/opt/Qt5/5.6/gcc_64/lib -lQt5Widgets -L/usr/lib64 -lQt5Gui -lQt5Core -lGL -lpthread 

  • Lifetime Qt Champion


    One thing you can try is to use the linux-g++-64 mkspec when you configure your project.

    Hope it helps

  • Thank You SGaist,

    this sounds interesting, but I do not know how to use "linux-g++-64 mkspec". Can you explain a little more, please, thank you.

  • Lifetime Qt Champion

    Since you are using Qt Creator, go to the Build & Run panel in the options, then Kit, select the kit you are using. There you'll have a line name Qt mkspec. You can set there the mkspec.

  • works now, thanks a lot :)

Log in to reply