views:

136

answers:

2
+2  Q: 

qt moc.exe error

i'm using QT Creator 1.3.1 and trying to compile, but get this error... please help me get rid of it

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'
+2  A: 

Did you check in Tools->Options->Qt4 if the QMake Location is correct ? I guess QtCreator is looking for moc.exe in the same folder.

On many workstation, I had to manually configure the QMake (and mingw) location otherwise I would get the same error as you.

Jérôme
looks like the qmake is in correct place, but i dont have any file called moc.exe...
kaycee
Maybe there was a problem during the installation. For instance, on my computer, `qmake.exe` is in the following path : `C:\Qt\2010.01\qt\bin` and this path is full of other executables : `moc.exe`, `lupdate.exe`, `lrelease.exe`, etc...Do you see any of these ?
Jérôme
i have those...but dont have moc.exe
kaycee
well, I would try to reinstall QtCreator (or look for `moc.exe` somewhere else on your harddisk, maybe it was inadvertantly moved ?).
Jérôme
indd you are right :)but now seems i get some other error:c:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lQtGuidcollect2: ld returned 1 exit status
kaycee
From the error message, it looks like the QtGuid library is not found. Can you find files named `*QtGuid*` in your `qt\lib` directory (for me the full path is `C:\Qt\2010.01\qt\lib`. Have you tried reinstalling QtCreator ? It seems your install is broken !
Jérôme
A: 

This problem occurs if the Build Settings/Build Direcory is not correct as well.

Gad D Lord