Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. [Moved] ’C:\Qt\4.7.2\binmoc.exe’ is not recognized as an internal or external command
Forum Updated to NodeBB v4.3 + New Features

[Moved] ’C:\Qt\4.7.2\binmoc.exe’ is not recognized as an internal or external command

Scheduled Pinned Locked Moved Language Bindings
8 Posts 3 Posters 6.7k 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.
  • D Offline
    D Offline
    DenJean
    wrote on last edited by
    #1

    When compiling the FreePascal Qt4 Binding library with Qt 4.7.2 I have above error.

    The error is that the directory separator is missing between bin and moc.exe.

    The same code compiles fine with Qt 4.5.3. To exclude installation problems I
    used a Virtualbox fresh install of Windows 7 and the Qt Libraries (MinGW)

    When installing Qt 4.5.3 with the corresponding MinGW version, it compiles on the same box with Qt 4.5

    error received:
    ...
    'C:\Qt\4.7.2\binmoc.exe' is not recognized as an internal or external command,
    operable program or batch file.
    mingw32-make: *** [tmp/moc_qobject_hook.cpp] Error 1

    output of qmake -query
    C:\Qt\qt4pas-V2.1_Qt4.5.3>qmake -query
    QT_INSTALL_PREFIX:C:\Qt\4.7.2
    QT_INSTALL_DATA:C:\Qt\4.7.2
    QT_INSTALL_DOCS:C:\Qt\4.7.2\doc
    QT_INSTALL_HEADERS:C:\Qt\4.7.2\include
    QT_INSTALL_LIBS:C:\Qt\4.7.2\lib
    QT_INSTALL_BINS:C:\Qt\4.7.2\bin
    QT_INSTALL_PLUGINS:C:\Qt\4.7.2\plugins
    QT_INSTALL_IMPORTS:C:\Qt\4.7.2\imports
    QT_INSTALL_TRANSLATIONS:C:\Qt\4.7.2\translations
    QT_INSTALL_CONFIGURATION:C:/Qt/4.7.2
    QT_INSTALL_EXAMPLES:C:\Qt\4.7.2\examples
    QT_INSTALL_DEMOS:C:\Qt\4.7.2\demos
    QMAKE_MKSPECS:C:\Qt\4.7.2\mkspecs
    QMAKE_VERSION:2.01a
    QT_VERSION:4.7.2

    code that does not compile with Qt 4.7 but does with Qt 4.5
    home page: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html
    code: Release V2.1 for Windows: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/win_qt4pas-V2.1_Qt4.5.3.zip

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      C:\Qt\4.7.2\binmoc.exe should be C:\Qt\4.7.2\bin\moc.exe. You probably have to look for some incorrect PATH setting.

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DenJean
        wrote on last edited by
        #3

        Thx for replying. I already noticed the missing separator (see line 2 first post). However a standard clean install of MinGW and Qt should have correct paths. That is why is posted qmake -query. The project is compiled by runningg qmake and then make. Apparently qmake creates a wrong Makefile. I do not think the qmake project files is responsible as using qt 4.5.X/corresponding MingGW works fine.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Franzk
          wrote on last edited by
          #4

          There could still be a difference in the makespecs. It never hurts to check.

          "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DenJean
            wrote on last edited by
            #5

            I fixed it by changing qmake.conf in mkspecs/win32-g++ and adding a "/"

            changed
            QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
            into

            QMAKE_MOC = $$[QT_INSTALL_BINS]/moc.exe

            apparently $${DIR_SEPARATOR} does not work in Qt 4.7 (it does in Qt 4.5)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DenJean
              wrote on last edited by
              #6

              I wanted to file a bug report but here is one already: http://bugreports.qt.nokia.com/browse/QTBUG-13896

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Franzk
                wrote on last edited by
                #7

                Excellent.

                "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

                http://www.catb.org/~esr/faqs/smart-questions.html

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

                  Please use the edit link below your avatar image/username right to a comment to edit a comment instead of adding a new one with the correct link.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  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