LINUX.ORG.RU

История изменений

Исправление EXL, (текущая версия) :

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ cat qt.cpp
#include <QtWidgets>
int main(int argc, char** argv) {
    QApplication app(argc, argv);
    QLabel lbl("Hello, World !");
    lbl.show(); app.exec();
}

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ cat test_qt.pro              
TEMPLATE = app
QT += widgets
SOURCES += qt.cpp

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ sudo mv /usr/include/GL/gl.h /usr/include/GL/gl.h~

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ qmake test_qt.pro
 
exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o qt.o qt.cpp
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qopenglcontext.h:54:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/QtGui:32,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QtWidgetsDepends:4,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QtWidgets:3,
                 from qt.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qopengl.h:122:21: fatal error: GL/gl.h: No such file or directory
 #  include <GL/gl.h>
                     ^
compilation terminated.
Makefile:378: recipe for target 'qt.o' failed
make: *** [qt.o] Error 1

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ sudo mv /usr/include/GL/gl.h~ /usr/include/GL/gl.h

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o qt.o qt.cpp
g++ -m64 -Wl,-O1 -o test_qt qt.o   -L/usr/X11R6/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread 

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ ldd test_qt | grep GL
        libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f47283a9000)

Исходная версия EXL, :

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ cat qt.cpp
#include <QtWidgets>
int main(int argc, char** argv) {
    QApplication app(argc, argv);
    QLabel lbl("Hello, World !");
    lbl.show(); app.exec();
}

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ cat test_qt.pro              
TEMPLATE = app
QT += widgets
SOURCES += qt.cpp

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ sudo mv /usr/include/GL/gl.h /usr/include/GL/gl.h~

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ qmake test_qt.pro
 
exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o qt.o qt.cpp
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qopenglcontext.h:54:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/QtGui:32,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QtWidgetsDepends:4,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QtWidgets:3,
                 from qt.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qopengl.h:122:21: fatal error: GL/gl.h: No such file or directory
 #  include <GL/gl.h>
                     ^
compilation terminated.
Makefile:378: recipe for target 'qt.o' failed
make: *** [qt.o] Error 1

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ sudo mv /usr/include/GL/gl.h~ /usr/include/GL/gl.h

exl@exl-Lenovo-G560e:~/SandBox/C_C++/test_qt$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o qt.o qt.cpp
g++ -m64 -Wl,-O1 -o test_qt qt.o   -L/usr/X11R6/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread