February 14, 2013

jtmz jtmz
Lab Rat
7 posts

Qt 5.0.1 for Windows 32-bit (MinGW 4.7) example project compilation error

 

Clean install of Qt 5.0.1 to Win 7 64-bit. It gives the following compilation error for calculator example project:

  1. C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe -spec win32-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug -o Makefile ..\calculator\calculator.pro
  2. C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Debug
  3. mingw32-make[1]: Entering directory 'C:/Qt/Qt5.0.1/5.0.1/mingw47_32/examples/widgets/widgets/calculator-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
  4. g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\calculator -I"..\..\..\..\include" -I"..\..\..\..\include\QtWidgets" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\QtCore" -I"debug" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o debug\button.o ..\calculator\button.cpp
  5.       1 [main] sh 5768 tty_list::allocate_tty: No tty allocated
  6. g++.exe: error: ..calculatorbutton.cpp: No such file or directory
  7. g++.exe: fatal error: no input files
  8. compilation terminated.

Where’s the problem ?

12 replies

February 14, 2013

leon.anavi leon.anavi
Area 51 Engineer
1216 posts
jtmz wrote:
Where’s the problem ?

According to the attached log the problem is here:

  1. g++.exe: error: ..calculatorbutton.cpp: No such file or directory

Have you modified the example? I don’t see file calculatorbutton.cpp at the original source of the example [qt-project.org]

 Signature 

http://anavi.org/

February 14, 2013

jtmz jtmz
Lab Rat
7 posts

:) yes I know it’s there, maybe I should ask what makes this happen?

Example is as it was after installation, no modifications. This happens also with a new projects. So if the name of the new project is test and first file to compile is main.cpp it gives error:

g++.exe: error: ..testmain.cpp: No such file or directory

So it somehow combines the project name and compiled file name?

February 19, 2013

zhanisch zhanisch
Lab Rat
11 posts

I have similar problem. I got similar error messages with any new created project (Qt gui or console) on Windows 7 64 bit platform. I am using Qt 5.0.1 with 32 bit mingw. On linux it is working well.

21:02:08: Running steps for project qt5_gui…
21:02:08: Starting: “C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe” C:\Users\Zoltan\Documents\Programming\qt5_gui\qt5_gui.pro -r -spec win32-g++ “CONFIG+=debug” “CONFIG+=declarative_debug” “CONFIG+=qml_debug”
21:02:09: The process “C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe” exited normally.
21:02:09: Starting: “C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe”
C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Debug
mingw32-make1: Entering directory ‘C:/Users/Zoltan/Documents/Programming/qt5_gui-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug’
C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\uic.exe ..\qt5_gui\mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\qt5_gui -I”..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include” -I”..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtWidgets” -I”..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtGui” -I”..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtCore” -I“debug” -I”.” -I”.” -I”..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspecs\win32-g++” -o debug\main.o ..\qt5_gui\main.cpp
g++.exe: error: ..qt5_guimain.cpp: No such file or directory
g++.exe: fatal error: no input files
compilation terminated.
Makefile.Debug:357: recipe for target ‘debug/main.o’ failed
mingw32-make1: *** [debug/main.o] Error 1
mingw32-make1: Leaving directory ‘C:/Users/Zoltan/Documents/Programming/qt5_gui-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug’
makefile:34: recipe for target ‘debug’ failed
mingw32-make: *** [debug] Error 2
21:02:11: The process “C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe” exited with code 2.
Error while building/deploying project qt5_gui (kit: Desktop Qt 5.0.1 MinGW 32bit)
When executing step ‘Make’

February 20, 2013

jtmz jtmz
Lab Rat
7 posts

OK. It works with Win XP 32-bit also. Win 7 64-bit seems to be the problem for this 5.0.1.

February 24, 2013

zhanisch zhanisch
Lab Rat
11 posts

I have found the problem!
I installed the GIT (on Windows) before! I removed from path the GIT and the compilation is working fine!

February 26, 2013

jtmz jtmz
Lab Rat
7 posts

Okey, but I don’t have GIT installation and path does not include any GIT relations.

February 26, 2013

zhanisch zhanisch
Lab Rat
11 posts

I’ve double checked. When I put the Git into the PATH and created a new project, I couldn’t compile it. If I removed from PATH, the compilation was successful.
I suspect that your PATH contains a program that has not compatible program with mingw or Qt 5.0. I don’t know.

I’ve found that sh.exe is the not compatible component in the GIT/bin folder.

February 27, 2013

jtmz jtmz
Lab Rat
7 posts

I totally removed the path variables from user variables and system variables. After that example project started to work. Then I started to put the same values back, one by one, to the path variables to solve which one causes the problem. Now I have exactly the same contents in path variables as in start but now it seems to work with those values ?

So removing the paths and putting them back again did the trick ? Don’t know how this is possible but now it works..

February 27, 2013

zhanisch zhanisch
Lab Rat
11 posts

The trick is after successful compilation the problematic and not compatible program won’t be called. If you delete the build directory (debug and release) you can get the same error message. I suggest that you should find the problematic folder/program. Maybe the sh.exe in a folder.

February 27, 2013

jtmz jtmz
Lab Rat
7 posts

Yes, I have noticed that also. New projects does not compile anymore with the existing path variables (Clean all and Rebuild all is not enough). I have to find out which path variable causes this.

February 27, 2013

jtmz jtmz
Lab Rat
7 posts

Okey. I think I have found the problem in my workstation. I have uninstalled the OpenSSH for Windows 3.8.1p1-1 (or something). Uninstall removes also the \OpenSSH\bin variable from path. After this all the projects has been working as they should.

March 28, 2013

neilmonday neilmonday
Lab Rat
1 posts

OpenSSH in my PATH was also the problem. Thanks.

 
  ‹‹ Queued invoke on virtual slot in constructor      [SOLVED] How to compare two images? ››

You must log in to post a reply. Not a member yet? Register here!