PDA

View Full Version : Compilation error with MSVC: Wrong MOC version



vuakko
25th June 2009, 20:52
Trying to compile moc_*.cpp files fails with MSVC 2005, gives error:

This file was generated using the moc from 4.4.3. It
cannot be used with the include files from this version of Qt.
(The moc has changed too much.)

Well, I just don't have and never had anything else but 4.5.1 installed on this machine. Calling
'moc -v' gives 4.5.1 and the moc_*.cpp have preprocessor commands

#error "This file was generated using the moc from 4.5.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"

So how in the world can I get errors about 4.4.3? How do I go about it? Calling 'nmake mocclean' and 'nmake clean' doesn't help.

nish
26th June 2009, 02:38
delete all the moc_xxxx.cpp files.

vuakko
26th June 2009, 08:38
Calling 'nmake mocclean' does exactly this. The build directory is totally empty. It still gives the same error.

nish
26th June 2009, 10:59
search for moc.exe and qmake.exe in your computer.. it is a possiblity that some unfriendly human has touched your pc.