我正在使用 QT Creator 1.3.1 并尝试编译,但出现此错误...
请帮我摆脱它
mingw32-make[1]: Leaving directory `C:/Documents and Settings/eyalk/My Documents/My QT Projects/XML'
mingw32-make: Leaving directory `C:/Documents and Settings/eyalk/My Documents/My QT Projects/XML'
'C:/Qt/2010.02.1/qt/bin\moc.exe' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make[1]: *** [debug/moc_mainwindow.cpp] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project XML
When executing build step 'Make'
最佳答案
如果 Tools->Options->Qt4
位置正确,您是否检查了 QMake
?我猜 QtCreator 正在同一个文件夹中寻找 moc.exe
。
在许多工作站上,我必须手动配置 QMake
(和 mingw
)位置,否则我会得到和你一样的错误。
关于qt moc.exe 错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2872005/