Results 1 to 9 of 9

Thread: Moc Error: Too many input files specified. Integration Problem?

  1. #1
    Join Date
    May 2010
    Posts
    46
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Exclamation Moc Error: Too many input files specified. Integration Problem?

    Hi,
    I have a really strange problem.

    I add a new QObject class I have a moc Error:

    Qt Code:
    1. #include <QObject>
    2.  
    3. class Final: public QObject
    4. {
    5. Q_OBJECT
    6. public:
    7. Final();
    8. };
    To copy to clipboard, switch view to plain text mode 


    I try to compile this code and this is the error:

    >Moc'ing Final.h...
    1>moc: Too many input files specified
    1>Usage: moc [options] <header-file>
    1> -o<file> write output to file rather than stdout
    1> -I<dir> add dir to the include path for header files
    1> -E preprocess only; do not generate meta object code
    1> -D<macro>[=<def>] define macro, with optional definition
    1> -U<macro> undefine macro
    1> -i do not generate an #include statement
    1> -p<path> path prefix for included file
    1> -f[<file>] force #include, optional file name
    1> -nw do not display warnings
    1> @<file> read additional options from file
    1> -v display version of moc
    1>Project : error PRJ0019: A tool returned an error code from "Moc'ing Final.h..."

    if I remove the macro Q_OBJECT compilation is successful (but I can't use SIGNAL and SLOT )


    Has anyone had the same problem?


    I'm workin in Windows 7 64bit, Qt 4.6.2, Qt Addin 1.1.7, Visual Studio 2005.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    It's not nice to ask the same question at multiple forums.
    http://developer.qt.nokia.com/forums/viewthread/1951/

  3. #3
    Join Date
    May 2010
    Posts
    46
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    Sorry Tbscope, but I'm not sure that there are the same people.

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

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    Try to rebuild your application (e.g. delete your old make file).

  5. #5
    Join Date
    May 2010
    Posts
    46
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    Quote Originally Posted by Lykurg View Post
    Try to rebuild your application (e.g. delete your old make file).
    I have the same problem

    I think that can be a wrong vcproj setting because I notided that only in this project (my solution is composed of multiple project) I don't have the visual studio autocomplete.

  6. #6
    Join Date
    May 2010
    Posts
    46
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    I have solved my problem: the solution is use Qt Addin 1.1.5 instead Qt Addin 1.1.7.

    I think that this is a Qt Addin 1.1.7 bug.

  7. #7
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    Hi, I had the same problem and I solved it by making a random change in the Visual Studio project properties. In my case changing the order of the additional include directories did the magic, but I think that any change could work since it seems to me that this issue is caused by a malformed vcproj file.
    Hope this helps.
    Cheers

  8. #8
    Join Date
    Feb 2007
    Posts
    28
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    Hello, in my installation(VS2008,Qt 4.7.1,Addin 1.1.7) " Files" is added at the end of Command Line In "Custom Build Step" for.h files. This gives the error message.
    If i add a .h-file i always have to remove the added "Files".

    Does anybody know how to modify the rules that were use to set the parameters in"Custom Build Steps"?

    Bye

  9. #9
    Join Date
    Mar 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Moc Error: Too many input files specified. Integration Problem?

    Using the Visual Studio plugin, I found a workaround by going into Qt Project Settings and selecting a new module, compiling, and then going back and deselecting.

Similar Threads

  1. qt eclipse integration error with mingw includes
    By hannesvdc in forum Installation and Deployment
    Replies: 0
    Last Post: 11th October 2010, 21:41
  2. Replies: 7
    Last Post: 18th September 2009, 14:44
  3. Mocing error with Visual Studio Integration
    By anonyme_84 in forum Qt Programming
    Replies: 3
    Last Post: 4th February 2008, 16:39
  4. QT-Eclipse integration error
    By comlink21 in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2007, 23:18
  5. Qt 4.1.4 on VS2005 error- cannot open input file 'qtmain.lib'
    By Ashish in forum Installation and Deployment
    Replies: 10
    Last Post: 11th October 2006, 16:05

Tags for this Thread

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.