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 errors in Hello World program (Qt 3.2.1)
Forum Updated to NodeBB v4.3 + New Features

Moc errors in Hello World program (Qt 3.2.1)

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.1k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    nealthwin
    wrote on last edited by
    #1

    Hello All,
    I am new to QT and I am following a book,C++ GUI with QT3. I have QT 3.2.1. I am on first example Hello Qt! and I got followin error message when I run make. It's on openSuse 13.1.

    linux-d0oe:/usr/local/qt-x11-free-3.2.1/tutorial/hello # make
    /usr/local/qt-x11-free-3.2.1/bin/moc -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/local/qt-x11-free-3.2.1/include/QtCore -I/usr/local/qt-x11-free-3.2.1/include/QtGui -I../../include -I. -I.moc/release-shared ../../src/kernel/qapplication.h -o .moc/release-shared/moc_qapplication.cpp
    Qt meta object compiler
    moc: Invalid argument
    Usage: moc [options] <header-file>
    -o file Write output to file rather than stdout
    -i Do not generate an #include statement
    -f[file] Force #include, optional file name
    -p path Path prefix for included file
    -k Do not stop on errors
    -nw Do not display warnings
    -v Display version of moc
    make: *** [.moc/release-shared/moc_qapplication.cpp] Error 1

    PS I really need help on this.
    Thanks,
    Neal

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

      nealthwin Please start new thread with you question.
      I suggest you to use the latest (5.2.1) version of Qt.
      You can download it "here":http://qt-project.org/downloads

      EDIT: I have split this out into a new thread --JKSH

      1 Reply Last reply
      0
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        Hi nealthwin,

        [quote]-I/usr/share/qt4/mkspecs/linux-g++[/quote]Your system is trying to mix Qt 3 and Qt 4. You cannot mix versions.

        How did you install Qt? What is the title of the book?

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        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