Note that there are some explanatory texts on larger screens.

plurals
  1. POQt moc.exe not generating *.moc file
    primarykey
    data
    text
    <p>I'm trying to build the <em>qtestlib/tutorial1 example</em>, but the <em>testqstring.moc</em> file isn't being generated when I run <code>nmake</code> (I'm running Qt 4.5.2 on Windows XP SP3).<br> I copied <em>testqstring.cpp</em> from the tutorial directory to my build directory (<em>C:\sandboxes\testqstring</em>) and from the Qt command prompt ran vsvars32.bat file from my MS Visual Studio 8 installation to add the VS environment variables.</p> <p>According to the tutorial, I should run:</p> <pre><code>&gt; qmake -project "CONFIG += qtestlib" &gt; qmake &gt; nmake </code></pre> <p>When I do, the output from <code>nmake</code> is:</p> <blockquote> <p>C:/Apps/Qt/2009.03/qt/bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_TESTLIB_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"....\Apps\Qt\2009.03\qt\include\QtCore" -I"....\Apps\Qt\2009.03\qt\include\QtGui" -I"....\Apps\Qt\2009.03\qt\include\QtTest" -I"....\Apps\Qt\2009.03\qt\include" -I"." -I"....\Apps\Qt\2009.03\qt\include\ActiveQt" -I"debug" -I"....\Apps\Qt\2009.03\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 testqstring.cpp -o debug\testqstring.moc</p> <p>g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_TESTLIB_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"....\Apps\Qt\2009.03\qt\include\QtCore" -I"....\Apps\Qt\2009.03\qt\include\QtGui" -I"....\Apps\Qt\2009.03\qt\include\QtTest" -I"....\Apps\Qt\2009.03\qt\include" -I"." -I"....\Apps\Qt\2009.03\qt\include\ActiveQt" -I"debug" -I"....\Apps\Qt\2009.03\qt\mkspecs\win32-g++" -o debug\testqstring.o testqstring.cpp</p> <p>testqstring.cpp:63:27: testqstring.moc: No such file or directory<br> NMAKE : fatal error U1077: 'C:\Apps\Qt\2009.03\mingw\bin\g++.EXE' : return code '0x1' Stop.<br> NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC\BIN\nmake.exe' : return code '0x2' Stop.</p> </blockquote> <p>So, I can see that moc.exe is being called to generate debug/testqstring.moc, but that file is never generated.</p> <p>Thank you for any and all guidance you can provide.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload