[Moved] ’C:\Qt\4.7.2\binmoc.exe’ is not recognized as an internal or external command
-
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 1output 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.2code 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 -
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.
-
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.
-
There could still be a difference in the makespecs. It never hurts to check.
-
I fixed it by changing qmake.conf in mkspecs/win32-g++ and adding a "/"
changed
QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
intoQMAKE_MOC = $$[QT_INSTALL_BINS]/moc.exe
apparently $${DIR_SEPARATOR} does not work in Qt 4.7 (it does in Qt 4.5)
-
I wanted to file a bug report but here is one already: http://bugreports.qt.nokia.com/browse/QTBUG-13896
-
Excellent.
-
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.