AnsweredAssumed Answered

imx8 移植opengl  QT编译错误

Question asked by li liu on May 23, 2019
Latest reply on May 30, 2019 by jimmychan

以下是错误信息:

/opt/qt-5.12.3-arm/bin/qmake -o Makefile ../gl_gui/gl_gui.pro -spec linux-aarch64-gnu-g++ CONFIG+=debug

Project ERROR: Unknown module(s) in QT: opengl

Makefile:203: recipe for target 'Makefile' failed

make: *** [Makefile] Error 3

16:44:39: 进程"/usr/bin/make"退出,退出代码 2 。

16:44:39: 正在启动 "/opt/qt-5.12.3-arm/bin/qmake" /home/mico/imax8/model_test/gl_gui/gl_gui.pro -r -spec linux-aarch64-gnu-g++ CONFIG+=debug

 

Project ERROR: Unknown module(s) in QT: opengl

16:44:39: 进程"/opt/qt-5.12.3-arm/bin/qmake"退出,退出代码 3 。

Error while building/deploying project gl_gui (kit: IMAX8)

When executing step "qmake"

 

以下是.pro文件配置:

 

QT += opengl widgets
QT += core gui
TEMPLATE    = app
CONFIG        += qt opengl warn_on release

CONFIG += console c++11
CONFIG -= app_bundle
#CONFIG -= qt
CONFIG +=debug_and_release

TARGET    = gl_gui



HEADERS        = \
#                  common.h \
#                  variables.h \
#    shader.h \
#    ../stb_image.h \
#    draw.h

SOURCES        = \
#                  variables.cpp \
#    stb_image.cpp \
#    modern_opengl.cpp \
#    draw.cpp \
    glad.c \
    gl_gui.cpp

INCLUDEPATH += \
    /usr/include \
    /usr/local/include \
    /usr/include/GL \
    /usr/include/glm \
    /usr/include/freetype2

#    /usr/include/glad

#QMAKE_CXXFLAGS += -std=c++11



#LIBS += \
#    /usr/lib/x86_64-linux-gnu/libboost*

#LIBS += -lGL -lGLU -lglut

LIBS += -lglut
LIBS+= -lGLU
LIBS+= -lGLEW
LIBS+= -lglfw3
LIBS +=-lpthread
LIBS +=-lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
LIBS+= -ldl
LIBS+= -lfreetype




#opencv-arm
INCLUDEPATH += /opt/iMX8QXP/opencv-arm/include \
               /opt/iMX8QXP/opencv-arm/include/opencv \
               /opt/iMX8QXP/opencv-arm/include/opencv2

LIBS += /opt/iMX8QXP/opencv-arm/lib/libopencv_*.so
LIBS += -L/opt/iMX8QXP/opencv-arm/lib/ -lopencv_core  -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs
#opencv-arm
LIBS += -lpthread -ldl

Outcomes