Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.0.1 for Windows 32-bit (MinGW 4.7) example project compilation error
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
13 Posts 4 Posters 11.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jtmz
    wrote on last edited by
    #1

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

    @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
    C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Debug
    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'
    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
    1 [main] sh 5768 tty_list::allocate_tty: No tty allocated
    g++.exe: error: ..calculatorbutton.cpp: No such file or directory
    g++.exe: fatal error: no input files
    compilation terminated.@

    Where's the problem ?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      [quote author="jtmz" date="1360839035"]
      Where's the problem ?
      [/quote]

      According to the attached log the problem is here:
      @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":http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-calculator.html

      http://anavi.org/

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jtmz
        wrote on last edited by
        #3

        :) 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?

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zhanisch
          wrote on last edited by
          #4

          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-make[1]: 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-make[1]: *** [debug/main.o] Error 1
          mingw32-make[1]: 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'

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jtmz
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              zhanisch
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jtmz
                wrote on last edited by
                #7

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

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  zhanisch
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    jtmz
                    wrote on last edited by
                    #9

                    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..

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      zhanisch
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        jtmz
                        wrote on last edited by
                        #11

                        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.

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          jtmz
                          wrote on last edited by
                          #12

                          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.

                          1 Reply Last reply
                          0
                          • N Offline
                            N Offline
                            neilmonday
                            wrote on last edited by
                            #13

                            OpenSSH in my PATH was also the problem. Thanks.

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved