PDA

View Full Version : Error compiling in Windows Vista



Maluko_Da_Tola
11th September 2010, 21:01
Hello,

I have written an application on Linux Ubuntu and it compiles and runs fine. However, when I try to compile the same project in Windows Vista the following error shows and Qt will not compile:

:: error: [debug/moc_SourceDialog.cpp] Error 1

Does anyone knows how to overcome this error?

Thank you very much

Lykurg
11th September 2010, 21:09
Please provide the real error message, not only the notification that there is one. See the console output.

Zlatomir
11th September 2010, 21:18
If your project compiled ok on linux, and fails on windows i guess that you copied the folder with all the files (including make files) and you selected your Qt Creator to import the build

If this is the case you can solve by running the Clean All option from the Build menu or manually delete the make files and other generated files.

If it's some other issue a more helpful error message can be obtained by selecting the Compile Output option in the output panel

Maluko_Da_Tola
11th September 2010, 21:21
Configuration unchanged, skipping qmake step.
Starting: "C:/Qt/2010.04/mingw/bin/mingw32-make.exe" -w
mingw32-make: Entering directory `G:/Waver/BoringRage-build-desktop'
C:/Qt/2010.04/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `G:/Waver/BoringRage-build-desktop'
C:\Qt\2010.04\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2010.04\qt\include\QtCore" -I"c:\Qt\2010.04\qt\include\QtGui" -I"c:\Qt\2010.04\qt\include" -I"c:\Qt\2010.04\qt\include\ActiveQt" -I"debug" -I"..\Waver 3" -I"." -I"c:\Qt\2010.04\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\Waver 3\SourceDialog.h -o debug\moc_SourceDialog.cpp
mingw32-make[1]: Leaving directory `G:/Waver/BoringRage-build-desktop'
mingw32-make: Leaving directory `G:/Waver/BoringRage-build-desktop'
moc: Too many input files specified
Usage: moc [options] <header-file>
-o<file> write output to file rather than stdout
-I<dir> add dir to the include path for header files
-E preprocess only; do not generate meta object code
-D<macro>[=<def>] define macro, with optional definition
-U<macro> undefine macro
-i do not generate an #include statement
-p<path> path prefix for included file
-f[<file>] force #include, optional file name
-nw do not display warnings
@<file> read additional options from file
-v display version of moc
mingw32-make[1]: *** [debug/moc_SourceDialog.cpp] Error 1
mingw32-make: *** [debug] Error 2
The process "C:/Qt/2010.04/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project BoringRage (target: Desktop)
When executing build step ''

Lykurg
11th September 2010, 21:32
Try to clean the whole directory containing your project and rerun qmake and build again (EDIT: like Zlatomir said). Seems like moc get confused. if that don't help, please let us see your pro file configuration and if you include a moc file directly in SourceDialog.cpp

Maluko_Da_Tola
11th September 2010, 21:41
Thank you once again,

it runs!