Results 1 to 3 of 3

Thread: Makefile warnings

  1. #1
    Join Date
    Jan 2006
    Location
    Berkeley California
    Posts
    109
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Makefile warnings

    I have suddenly started getting the following make warnings:

    Makefile.Debug:137: warning: overriding commands for target `debug\moc_MainWindow.cpp'
    Makefile.Debug:129: warning: ignoring old commands for target `debug\moc_MainWindow.cpp'
    Makefile.Debug:226: warning: overriding commands for target `debug\moc_MainWindow.o'
    Makefile.Debug:220: warning: ignoring old commands for target `debug\moc_MainWindow.o'

    and the following errors:

    ./debug\moc_mainwindow.o(.text+0x100): In function `ZNK10MainWindow10metaObjectEv':
    C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp:97: multiple definition of `MainWindow::metaObject() const'
    ./debug\moc_MainWindow.o(.text+0x100):C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp:97: first defined here
    ./debug\moc_mainwindow.o(.text+0x10a): In function `ZN10MainWindow11qt_metacastEPKc':
    C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp:102: multiple definition of `MainWindow::qt_metacast(char const*)'
    ./debug\moc_MainWindow.o(.text+0x10a):C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp:102: first defined here
    ./debug\moc_mainwindow.o(.text+0x158): In function `ZN10MainWindow11qt_metacallEN11QMetaObject4CallEi PPv':
    C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp:110: multiple definition of `MainWindow::qt_metacall(QMetaObject::Call, int, void**)'
    ./debug\moc_MainWindow.o(.text+0x158):C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp:110: first defined here
    ./debug\moc_mainwindow.o(.data+0x0): In function `ZThn8_N10MainWindowD1Ev':
    C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp: multiple definition of `MainWindow::staticMetaObject'
    ./debug\moc_MainWindow.o(.data+0x0):C:/Data/Qt/mverse/n1/debug/moc_mainwindow.cpp: first defined here

    This happened after a 'qmake -project' 'qmake n1.pro' 'make'

    I have tried undoing my changes but I must be overlooking something, they still show up.

    Thanks
    Doug Broadwell

  2. #2
    Join Date
    Jan 2006
    Location
    Berkeley California
    Posts
    109
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Makefile warnings

    P.S., this is in version 4.1.1

  3. #3
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Makefile warnings

    It looks like a header file has been added several time to the HEADERS variable... Check out the content of the pro file and remove any duplicated files. alternatively you can substitute operator "*=" to operator "+=". Thus qmake will itself ensure that each file is present only once...
    Current Qt projects : QCodeEdit, RotiDeCode

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.