Results 1 to 5 of 5

Thread: Why do I get this error?

  1. #1
    Join Date
    Apr 2010
    Posts
    77
    Thanks
    10
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Why do I get this error?

    Hi Guys

    I've been building a project from terminal on a Mac and debugging from XCode.

    But I decided to try building from QT Creator and debug from there also to save time.
    When I try to build from QT I get this error:
    :: error: [moc_JBUtilities.cpp] Error 1

    Any ideas?

    Thanks
    Jeff

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Why do I get this error?

    I'm not sure how many here have crystal balls, but you might want to show us a bit more so we can help you, i.e. code, project file, build log etc.

  3. #3
    Join Date
    Apr 2010
    Posts
    77
    Thanks
    10
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Why do I get this error?

    Good point:

    Using Qt 4.7 on Mac OS 10.6 (Snow Leopard).

    Relevant compile output:

    new attempt/JBUtilities.h -o moc_JBUtilities.cpp
    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
    make: *** [moc_JBUtilities.cpp] Error 1

    First part of .h file for JBUtilities:

    Qt Code:
    1. #ifndef JBUTILITIES_H
    2. #define JBUTILITIES_H
    3.  
    4. #include <QObject>
    5. #include <QHash>
    6. #include <QBrush>
    7. #include <QMessageBox>
    8. #include "JBConstants.h"
    9.  
    10. class JBUtilities : public QObject
    11. {
    12. Q_OBJECT
    13.  
    14. public:
    15. static JBUtilities* getJBUtilities();
    16. QString getTableNameForLabel(const QString &aLabel) const;
    17. QString getLabelForTableName(const QString &aTableName) const;
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Why do I get this error?

    You have an unescaped space in your path.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Apr 2010
    Posts
    77
    Thanks
    10
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Why do I get this error?

    @Wysota

    As always you are a great help.
    Thanks. You are spot on.

    Cheers
    Jeff

Similar Threads

  1. no compile error, but error on run with QMenu QAction
    By sincnarf in forum Qt Programming
    Replies: 4
    Last Post: 4th May 2011, 11:05
  2. Replies: 3
    Last Post: 23rd January 2011, 12:15
  3. fatal error C1001: An internal error has occurred in the compiler
    By noodles in forum Installation and Deployment
    Replies: 0
    Last Post: 12th August 2010, 11:24
  4. Replies: 1
    Last Post: 25th October 2008, 19:18
  5. ERROR:: QPainter: Internal error; no available GC
    By Krishnacins in forum Qt Programming
    Replies: 2
    Last Post: 8th March 2006, 06:05

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
  •  
Qt is a trademark of The Qt Company.