Results 1 to 6 of 6

Thread: Error compiling in Windows Vista

  1. #1
    Join Date
    Jul 2010
    Posts
    72
    Thanks
    35
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Error compiling in Windows Vista

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Error compiling in Windows Vista

    Please provide the real error message, not only the notification that there is one. See the console output.

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Error compiling in Windows Vista

    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

  4. The following user says thank you to Zlatomir for this useful post:

    Maluko_Da_Tola (11th September 2010)

  5. #4
    Join Date
    Jul 2010
    Posts
    72
    Thanks
    35
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error compiling in Windows Vista

    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 ''

  6. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Error compiling in Windows Vista

    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

  7. The following user says thank you to Lykurg for this useful post:

    Maluko_Da_Tola (11th September 2010)

  8. #6
    Join Date
    Jul 2010
    Posts
    72
    Thanks
    35
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error compiling in Windows Vista

    Thank you once again,

    it runs!

Similar Threads

  1. Replies: 3
    Last Post: 12th July 2010, 06:25
  2. Error compiling Qt Creator src on windows
    By munna in forum Installation and Deployment
    Replies: 2
    Last Post: 18th May 2009, 12:58
  3. Error when compiling for static version in windows
    By que in forum Installation and Deployment
    Replies: 4
    Last Post: 28th October 2008, 20:41
  4. QtSql and Windows Vista
    By imitrik in forum Qt Programming
    Replies: 1
    Last Post: 5th October 2007, 19:19
  5. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 22:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.