Home > Mobile >  About qtcreator cannot compile, the make command to compile problem
About qtcreator cannot compile, the make command to compile problem

Time:11-02

Cross compile tools has been installed configuration path as shown in figure:



Build - & gt; Run qmake no problem:
15:00:31: Running steps for project untitled_new1...
15:00:31: Starting: "/opt/poky/1.7/sysroots/x86_64 - pokysdk - Linux/usr/bin/qt5/qmake"/MNT/HGFS qt_vmshare/untitled_new1/untitled_new1 pro - r - spec Linux - oe - g + + +=CONFIG the debug
15:00:32: The process "/opt/poky/1.7/sysroots/x86_64 - pokysdk - Linux/usr/bin/qt5/qmake" exited normally.
15:00:32: Elapsed time: 00:01onsaturday (UK time).

Build - & gt; Buildall compile error:
15:05:43: Running steps for project untitled_new1...
15:05:43: Configuration unchanged, skipping qmake step.
15:05:43: Starting: "/usr/bin/make"
c -pipe -g -DLINUX=1 -DEGL_API_FB=1 -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I. -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5 -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -o main.o main.cpp
make: c: Command not found
The Makefile: 709: the recipe for target 'main. O' failed
c -pipe -g -DLINUX=1 -DEGL_API_FB=1 -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I. -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5 -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -o widget.o widget.cpp
Makefile: 845: the recipe for target 'widget. O' failed
Make: [the main] o Error 127 (ignored)
Make: c: Command not found
Make: [widget. O] Error 127 (ignored)
c -pipe -g -DLINUX=1 -DEGL_API_FB=1 -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++ -I. -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5 -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWidgets -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtGui -I/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I. -o moc_widget.o moc_widget.cpp
The Makefile: 848: the recipe for target 'moc_widget. O' failed
O untitled_new1 main. O widget. O moc_widget. O - L/opt/poky/1.7/sysroots/cortexa9hf - VFP - neon - poky - Linux - gnueabi/usr/lib - lQt5Widgets - lQt5Gui - lQt5Core lGLESv2 - lEGL lGAL - lpthread
Makefile: 202: the recipe for target 'untitled_new1 failed
Make: c: Command not found
Make: [moc_widget. O] Error 127 (ignored)
Make: o: Command not found
Make: [untitled_new1] Error 127 (ignored)
15:05:43: The process "/usr/bin/make" exited normally.
15:05:43: Elapsed time: 00:00.

if used in project directory: the make command compiler, is also no problem, can produce an executable file,

Using qtcreator compiler will go wrong, what reason be,



CodePudding user response:

Complier add a c + + compiler, you fill in is c

CodePudding user response:

Your compiler should be g + + ah, how do you become a c, not directly modify Makefile to compiler command to change into available, such as: g + +
General corresponding Makefile in the variable $(MAKE)

CodePudding user response:

A newspaper wrong, know cross-compilation environment variable configuration,
Yocto cross-compilation environment, configuration into the Qt Creator, there are two ways:
The first: simple point, at the command line, first souce environment - setup - * * * * *, and then the command line to perform startup Qt
The orders of the Creator;
The second: a little more complicated, it is through the env command to print all the environment variables, and then copy these environment variables to the Qt environment option in the configuration of the Kits,

I see, you are Qt 5.3.2 the Creator of the location of the unknown environment, if not, you can install a slightly higher version of the Creator, is my Qt5.8,

CodePudding user response:

If there is always some compile in qt configuration of the above problems, and don't know how to solve the proposed to qt reinstall, or install the updated version, configure the environment again, it may be faster to solve the problem, because sometimes from already forgot to modify where, always can't normal use, anyway, I be a few times, so get along while, reinstall and reconfigure the normal,,,

CodePudding user response:

reference 3 floor bow people water response:
a newspaper wrong, just know cross-compilation environment variable configuration,
Yocto cross-compilation environment, configuration into the Qt Creator, there are two ways:
The first: simple point, at the command line, first souce environment - setup - * * * * *, and then the command line to perform startup Qt
The orders of the Creator;
The second: a little more complicated, it is through the env command to print all the environment variables, and then copy these environment variables to the Qt environment option in the configuration of the Kits,

I see, you are Qt 5.3.2 the Creator of the location of the unknown environment, if not, you can install a slightly higher version of the Creator, is my Qt5.8,

Problem solving, it is a question of environment variables,
  •  Tags:  
  • Qt
  • Related