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:

    @
    #include <QObject>

    class Final: public QObject
    {
    Q_OBJECT
    public:
    Final();
    };
    @

    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.

    [edit: code highlighted / Denis Kormalev]



  • try to build your application in cmd.exe (qmake && nmake)



  • Please use @ tags, not code ones.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.