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. Compiler Error under Qt5.0.1-mingw for Windows 7 (x86_64) -- Compiler Seems To Ignore Directory Levels

Compiler Error under Qt5.0.1-mingw for Windows 7 (x86_64) -- Compiler Seems To Ignore Directory Levels

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 3.1k Views
  • 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.
  • G Offline
    G Offline
    ggalt
    wrote on last edited by
    #1

    When I attempt to build projects under Qt 5.0.1-mingw I get the following type of error -- for example, while compiling the "digital clock" example:

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

    The compiler appears to ignore the "" between "digitalclock" (the parent directory) and "main.cpp" the file. BTW, it happens on ALL of my projects, even ones that I've compiled before on earlier version of Qt.

    Here is the full compiler line:
    C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'C:/Users/Public/Documents/workspace/digitalclock-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_QUICK_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\digitalclock -I"..\digitalclock\qtquick2applicationviewer" -I"..........\Qt\Qt5.0.1\5.0.1\mingw47_32\include" -I"..........\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtQuick" -I"..........\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtQml" -I"..........\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtNetwork" -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"..........\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspecs\win32-g++" -o debug\main.o ..\digitalclock\main.cpp

    Does anyone have any thoughts on this issue or how to correct it? I've uninstalled and reinstalled Qt5.0.1-mingw several times. I did install Qt5.0.1-msvc2010 and can report that it doesn't happen under that compiler, but I'd rather stick with mingw32.

    Thanks,

    George

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wakeuky
      wrote on last edited by
      #2

      Check your environment variables. Ensure that you have updated them for 5.0.1. For example, mine looks like this:
      PATH = C:\Ruby200-x64\bin;C:\Python33;D:\Qt\Qt5.0.1\Tools\MinGW\bin;

      Remember, you may need to reboot for changes to propagate.

      Don't Panic

      1 Reply Last reply
      0
      • G Offline
        G Offline
        ggalt
        wrote on last edited by
        #3

        Path is already set with c:\Qt\Qt5.0.1\Tools\MingW\bin, so it's not a path issue. Besides, I'm not sure how a bad path would prevent the compiler from seeing the "" between the directory and the file name.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Allan
          wrote on last edited by
          #4

          Hello, I have got the same thing. I am running windows 8

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Allan
            wrote on last edited by
            #5

            I have found my problem. The problem is caused by sh.exe of GIT utilities. After renaming the sh.exe, everything starts working. Hopefully, it will help anyone who has similar problem.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              ggalt
              wrote on last edited by
              #6

              @Allen, I'll give it a try and report back. Where did you find that particular file? Was it in the mingw32 library or was it in your git utility (I assume something like Msys git bash).

              Thanks!

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Allan
                wrote on last edited by
                #7

                This is how I found it: I added those missing slashes. In the end, it complains something related to sh.exe of GIT utilities.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  ggalt
                  wrote on last edited by
                  #8

                  @Allen, thanks! It worked for me as well.

                  FYI, I had 3 copies of the file "sh.exe" on my computer -- in /"Program Files (x86)"/Git/bin, in /cygwin/bin and in /MinGW/msys/1.0/bin. I only renamed the one in "Program Files (x86)" because that was the only one in my PATH statement, but left the other 2 unaltered. It may be that, depending on your PATH statements, that the others might be a problem as well. Only the /"Program Files (x86)"/Git/bin/ path was in my PATH statement, so it could be that QtCreator might object to the others if it could find them. Oddly enough, the version of MinGW installed by Qt5.0.1 does not contain sh.exe.

                  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