Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Moc Error: Too many input files specified. Integration Problem?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 7.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DaxQT
    wrote on last edited by
    #1

    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]

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexander
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DenisKormalev
        wrote on last edited by
        #3

        Please use @ tags, not code ones.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved