QApplication: No such file or directory error resolution

First open the Makefile and check whether the value of the INCPATH variable contains the path of the header files involved in the program.

MAKEFILE      = Makefile

####### Compiler, tools and options

CC            = /work/tools/usr/local/arm/4.3.2/bin/arm-linux-gcc -lts -ldl
CXX           = /work/tools/usr/local/arm/4.3.2/bin/arm-linux-g++ -lts -ldl
DEFINES       = -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS        = -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv7-a -mtune=cortex-a8 -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS      = -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv7-a -mtune=cortex-a8 -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv7-a -mtune=cortex-a8 -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
INCPATH       = -I. -I. -I/Qt5/include -I/Qt5/include/QtWidgets -I/Qt5/include/QtGui -I/Qt5/include/QtCore -I. -I/Qt5/mkspecs/linux-arm-gnueabi-g++
QMAKE         = /Qt5/bin/qmake
DEL_FILE      = rm -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p
COPY          = cp -f
COPY_FILE     = cp -f
COPY_DIR      = cp -f -R
INSTALL_FILE  = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR   = cp -f -R
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir

If it does not exist, check whether the file is imported in the .pro file. You can add it in the form of QT += XXX, for example:

Prompt "NO QApplication ....", then add QT += widgets, re-qmake and then make.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324933302&siteId=291194637