Qt Creator Error

Running debugging for the project and then

Running build steps for project Text_Editor... Starting: "c:/qt/2010.05/qt/bin/qmake.exe" C:/Qt/2010.05/Text_Editor/Text_Editor.pro -r -spec win32-g++ The process "c:/qt/2010.05/qt/bin/qmake.exe" exited normally. Starting: "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w mingw32-make: Entering directory `C:/Qt/2010.05/Text_Editor-build-desktop' C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `C:/Qt/2010.05/Text_Editor-build-desktop' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\qt\include\QtCore" -I"..\qt\include\QtGui" -I"..\qt\include" -I"..\qt\include\ActiveQt" -I"debug" -I"..\Text_Editor" -I"." -I"..\qt\mkspecs\win32-g++" -o debug\main.o ..\Text_Editor\main.cpp mingw32-make[1]: Leaving directory `C:/Qt/2010.05/Text_Editor-build-desktop' mingw32-make: Leaving directory `C:/Qt/2010.05/Text_Editor-build-desktop' g++: ..\Text_Editor\main.cpp: No such file or directory g++: no input files mingw32-make[1]: *** [debug/main.o] Error 1 mingw32-make: *** [debug] Error 2 The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2. Error while building project Text_Editor (target: Desktop) When executing build step 'Make' 

I have no idea about this. I just installed it, created a new project and instantly got this error.

+4
source share
5 answers

I had almost the same problem just now. Without going into the “why” - I dismissed the “Shadow build” from the project options, and my build was successful. The funny part is the Shadow Build worked yesterday, and nothing has changed so much between them.

+2
source

For one reason or another, it cannot find your main.cpp (g ++: .. \ Text_Editor \ main.cpp: there is no such file or directory). Basically, this path should be ok if you have shadow assembly enabled.

The place where trying to find main.cpp is this:

From: /Qt/2010.05/Text_Editor/main.cpp

Make sure this is the correct location (also pay attention to case sensitivity)

you can try to disable the shadow assembly from the project -> close the shadow assembly. And also you should check that Text_Editor.pro contains correctly main.cpp.

Edit: It might be advisable to create this project outside of the Qt binary folder, in another more logical folder.

+1
source

Try changing the assembly directory from C: /Qt/2010.05/Text_Editor-build-desktop to C: /Qt/2010.05/Text_Editor .

To do this, simply open your project in the Qt creator, left-click on the Project in the left pane, then open the build options tab and edit the Build directory .

+1
source

What worked for me was how I added the headers in .pri.

It works...

 HEADERS += ../serialportwidget.h HEADERS += ../serialportworker.h SOURCES += ../serialportwidget.cpp SOURCES += ../serialportworker.cpp 

or

 HEADERS += ../serialportwidget.h \ ../serialportworker.h SOURCES += ../serialportwidget.cpp \ ../serialportworker.cpp 

Is not...

 HEADERS += ../serialportwidget.h \ ../serialportworker.h SOURCES += ../serialportwidget.cpp \ ../serialportworker.cpp 
0
source

Launch Qt Creator using Run as Administrator.

Problem Solved for error [debug / main.o] 5

- Vivin NL

-1
source

Source: https://habr.com/ru/post/1336607/


All Articles