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. Compilation error - moc.exe missing
Forum Updated to NodeBB v4.3 + New Features

Compilation error - moc.exe missing

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 4 Posters 2.2k Views 2 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.
  • MasterBLBM Offline
    MasterBLBM Offline
    MasterBLB
    wrote on last edited by
    #1

    Hey Qt mates

    I have no idea what hell lured me to try "Analyze" option, but since then I can't compile my project - I get error:
    /MinGW/msys/1.0/bin/sh.exe: C:QtQt5.11.15.11.1mingw53_32binmoc.exe: command not found
    Yeah, I noticed there are / or \ missing.
    I don't do cross compilation, I checked everything I could in Build & Run > Kits, %PATH% etc, and have no idea what's wrong. Have reinstalled Qt entirely, yet the error still persists.
    Any hints how to solve?

    Qt 5.11.1, Qt Creator 4.6, OS Windows 7.

    jsulmJ 2 Replies Last reply
    0
    • MasterBLBM Offline
      MasterBLBM Offline
      MasterBLB
      wrote on last edited by
      #9

      Removed both entries (C:\mingw\bin and C:\MinGW\msys\1.0\bin), but it doesn't solve the issue. Renaming sh.exe to sh2.exe helped, though.
      But I'm more interested what is the root cause, as this is rather a bandage solution. Compilation worked for months smoothly, alongside with that MinGW installed, and only recently it broke out of arse, when I tried to use profiling tools located in "Analyze" menu. Maybe a bug in Qt Creator or Qt??

      jsulmJ 1 Reply Last reply
      0
      • MasterBLBM MasterBLB

        Hey Qt mates

        I have no idea what hell lured me to try "Analyze" option, but since then I can't compile my project - I get error:
        /MinGW/msys/1.0/bin/sh.exe: C:QtQt5.11.15.11.1mingw53_32binmoc.exe: command not found
        Yeah, I noticed there are / or \ missing.
        I don't do cross compilation, I checked everything I could in Build & Run > Kits, %PATH% etc, and have no idea what's wrong. Have reinstalled Qt entirely, yet the error still persists.
        Any hints how to solve?

        Qt 5.11.1, Qt Creator 4.6, OS Windows 7.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @MasterBLB Did you try to delete build folder, run qmake and build?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • MasterBLBM Offline
          MasterBLBM Offline
          MasterBLB
          wrote on last edited by
          #3

          Of course.
          I have even started a fresh project, and copied source files (.h, .cpp and .ui) into it and still NOPE.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Hi,

            From the look of the error, I would say that it might be the msys shell that is wreaking havoc.
            How did you install Qt ?
            How did you setup your Kit and Qt version ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • MasterBLBM Offline
              MasterBLBM Offline
              MasterBLB
              wrote on last edited by
              #5

              I used qt-opensource-windows-x86-5.11.1.exe offline installer, and when asked to choose component I selected MinGW 32 only, and installed MinGW 5.3.0 as well.
              Kit setup
              0_1557838139546_Qt kit setup.PNG

              1 Reply Last reply
              0
              • MasterBLBM MasterBLB

                Hey Qt mates

                I have no idea what hell lured me to try "Analyze" option, but since then I can't compile my project - I get error:
                /MinGW/msys/1.0/bin/sh.exe: C:QtQt5.11.15.11.1mingw53_32binmoc.exe: command not found
                Yeah, I noticed there are / or \ missing.
                I don't do cross compilation, I checked everything I could in Build & Run > Kits, %PATH% etc, and have no idea what's wrong. Have reinstalled Qt entirely, yet the error still persists.
                Any hints how to solve?

                Qt 5.11.1, Qt Creator 4.6, OS Windows 7.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @MasterBLB said in Compilation error - moc.exe missing:

                /MinGW/msys/1.0/bin/sh.exe

                Did you install any other MinGW or MSYS and have them in your PATH?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • MasterBLBM Offline
                  MasterBLBM Offline
                  MasterBLB
                  wrote on last edited by
                  #7

                  Only the one provided in the qt package, and yes, there are paths to mingw folder in PATH.

                  aha_1980A 1 Reply Last reply
                  0
                  • MasterBLBM MasterBLB

                    Only the one provided in the qt package, and yes, there are paths to mingw folder in PATH.

                    aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @MasterBLB said in Compilation error - moc.exe missing:

                    Only the one provided in the qt package, and yes, there are paths to mingw folder in PATH.

                    Can you try to remove them? Creator sets up it's PATHs automatically for compiling and running.

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    0
                    • MasterBLBM Offline
                      MasterBLBM Offline
                      MasterBLB
                      wrote on last edited by
                      #9

                      Removed both entries (C:\mingw\bin and C:\MinGW\msys\1.0\bin), but it doesn't solve the issue. Renaming sh.exe to sh2.exe helped, though.
                      But I'm more interested what is the root cause, as this is rather a bandage solution. Compilation worked for months smoothly, alongside with that MinGW installed, and only recently it broke out of arse, when I tried to use profiling tools located in "Analyze" menu. Maybe a bug in Qt Creator or Qt??

                      jsulmJ 1 Reply Last reply
                      0
                      • MasterBLBM MasterBLB

                        Removed both entries (C:\mingw\bin and C:\MinGW\msys\1.0\bin), but it doesn't solve the issue. Renaming sh.exe to sh2.exe helped, though.
                        But I'm more interested what is the root cause, as this is rather a bandage solution. Compilation worked for months smoothly, alongside with that MinGW installed, and only recently it broke out of arse, when I tried to use profiling tools located in "Analyze" menu. Maybe a bug in Qt Creator or Qt??

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #10

                        @MasterBLB Did you log off and on after changing PATH?

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • MasterBLBM Offline
                          MasterBLBM Offline
                          MasterBLB
                          wrote on last edited by MasterBLB
                          #11

                          Not only logged off, but after next log on I used in cmd "set > variables.txt" to ensure C:\MinGW paths are removed. And yes, PATH looks good, the only MinGW entries are these:

                          C:\Qt\Qt5.11.1\5.11.1\mingw53_32\bin;C:\Qt\Qt5.11.1\Tools\mingw530_32\bin\
                          
                          jsulmJ 1 Reply Last reply
                          0
                          • MasterBLBM MasterBLB

                            Not only logged off, but after next log on I used in cmd "set > variables.txt" to ensure C:\MinGW paths are removed. And yes, PATH looks good, the only MinGW entries are these:

                            C:\Qt\Qt5.11.1\5.11.1\mingw53_32\bin;C:\Qt\Qt5.11.1\Tools\mingw530_32\bin\
                            
                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #12

                            @MasterBLB For MinGW to work with Qt you do not need any MinGW entries in your PATH at all

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            1

                            • Login

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