Results 1 to 5 of 5

Thread: problem in .o and moc files

  1. #1
    Join Date
    Sep 2009
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default problem in .o and moc files

    hi,

    I'm trying to compile a project that gives me this errors

    Qt Code:
    1. plotstuff.o:(.rodata._ZTV6Zoomer[vtable for Zoomer]+0xc): undefined reference to `QwtPlotZoomer::qt_metacast(char const*)'
    2. plotstuff.o:(.rodata._ZTV6Zoomer[vtable for Zoomer]+0x10): undefined reference to `QwtPlotZoomer::qt_metacall(QMetaObject::Call, int, void**)'
    3. plotstuff.o:(.rodata._ZTV6Zoomer[vtable for Zoomer]+0x68): undefined reference to `QwtPlotZoomer::accept(QPolygon&) const'
    4. plotstuff.o:(.rodata._ZTV6Zoomer[vtable for Zoomer]+0xb4): undefined reference to `QwtPlotPicker::trackerText(QPointF const&) const'
    5. plotstuff.o:(.rodata._ZTV6Zoomer[vtable for Zoomer]+0xbc): undefined reference to `QwtPlotZoomer::setZoomBase(QRectF const&)'
    6. plotstuff.o:(.rodata._ZTV6Zoomer[vtable for Zoomer]+0xc4): undefined reference to `QwtPlotZoomer::zoom(QRectF const&)'
    7. moc_plotstuff.o: In function `sensorsPlot::qt_metacall(QMetaObject::Call, int, void**)':
    8. /home/mendes/Desktop/d/moc_plotstuff.cpp:61: undefined reference to `QwtPlot::qt_metacall(QMetaObject::Call, int, void**)'
    9. moc_plotstuff.o: In function `sensorsPlot::qt_metacast(char const*)':
    10. /home/mendes/Desktop/d/moc_plotstuff.cpp:56: undefined reference to `QwtPlot::qt_metacast(char const*)'
    11. moc_plotstuff.o:(.rodata+0x0): undefined reference to `QwtPlot::staticMetaObject'
    12. moc_sensorwidgets.o: In function `steeringMeter::qt_metacall(QMetaObject::Call, int, void**)':
    13. /home/mendes/Desktop/d/moc_sensorwidgets.cpp:144: undefined reference to `QwtCompass::qt_metacall(QMetaObject::Call, int, void**)'
    14. moc_sensorwidgets.o: In function `steeringMeter::qt_metacast(char const*)':
    15. /home/mendes/Desktop/d/moc_sensorwidgets.cpp:139: undefined reference to `QwtCompass::qt_metacast(char const*)'
    16. moc_sensorwidgets.o: In function `scaleMeter::qt_metacall(QMetaObject::Call, int, void**)':
    17. /home/mendes/Desktop/d/moc_sensorwidgets.cpp:101: undefined reference to `QwtThermo::qt_metacall(QMetaObject::Call, int, void**)'
    18. moc_sensorwidgets.o: In function `scaleMeter::qt_metacast(char const*)':
    19. /home/mendes/Desktop/d/moc_sensorwidgets.cpp:96: undefined reference to `QwtThermo::qt_metacast(char const*)'
    20. moc_sensorwidgets.o: In function `dialMeter::qt_metacall(QMetaObject::Call, int, void**)':
    21. /home/mendes/Desktop/d/moc_sensorwidgets.cpp:58: undefined reference to `QwtDial::qt_metacall(QMetaObject::Call, int, void**)'
    22. moc_sensorwidgets.o: In function `dialMeter::qt_metacast(char const*)':
    23. /home/mendes/Desktop/d/moc_sensorwidgets.cpp:53: undefined reference to `QwtDial::qt_metacast(char const*)'
    24. moc_sensorwidgets.o:(.rodata+0x0): undefined reference to `QwtDial::staticMetaObject'
    25. moc_sensorwidgets.o:(.rodata+0x10): undefined reference to `QwtThermo::staticMetaObject'
    26. moc_sensorwidgets.o:(.rodata+0x20): undefined reference to `QwtCompass::staticMetaObject'
    27. moc_sensorwidgets.o:(.rodata._ZTV13steeringMeter[vtable for steeringMeter]+0x178): undefined reference to `non-virtual thunk to QwtAbstractSlider::setValue(double)'
    28. moc_sensorwidgets.o:(.rodata._ZTV13steeringMeter[vtable for steeringMeter]+0x17c): undefined reference to `non-virtual thunk to QwtAbstractSlider::incValue(int)'
    29. moc_sensorwidgets.o:(.rodata._ZTV13steeringMeter[vtable for steeringMeter]+0x184): undefined reference to `non-virtual thunk to QwtAbstractSlider::fitValue(double)'
    30. moc_sensorwidgets.o:(.rodata._ZTV13steeringMeter[vtable for steeringMeter]+0x188): undefined reference to `non-virtual thunk to QwtDial::valueChange()'
    31. moc_sensorwidgets.o:(.rodata._ZTV13steeringMeter[vtable for steeringMeter]+0x190): undefined reference to `non-virtual thunk to QwtDial::rangeChange()'
    32. moc_sensorwidgets.o:(.rodata._ZTV10scaleMeter[vtable for scaleMeter]+0x110): undefined reference to `non-virtual thunk to QwtThermo::scaleChange()'
    33. moc_sensorwidgets.o:(.rodata._ZTV9dialMeter[vtable for dialMeter]+0x174): undefined reference to `non-virtual thunk to QwtAbstractSlider::setValue(double)'
    34. moc_sensorwidgets.o:(.rodata._ZTV9dialMeter[vtable for dialMeter]+0x178): undefined reference to `non-virtual thunk to QwtAbstractSlider::incValue(int)'
    35. moc_sensorwidgets.o:(.rodata._ZTV9dialMeter[vtable for dialMeter]+0x180): undefined reference to `non-virtual thunk to QwtAbstractSlider::fitValue(double)'
    36. moc_sensorwidgets.o:(.rodata._ZTV9dialMeter[vtable for dialMeter]+0x184): undefined reference to `non-virtual thunk to QwtDial::valueChange()'
    37. moc_sensorwidgets.o:(.rodata._ZTV9dialMeter[vtable for dialMeter]+0x18c): undefined reference to `non-virtual thunk to QwtDial::rangeChange()'
    To copy to clipboard, switch view to plain text mode 

    can anyone give a help?

    thanks,
    mendes

  2. #2
    Join Date
    Nov 2006
    Location
    Saudi Arabia
    Posts
    18
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in .o and moc files

    make sure you installed qwt library and in the project file(.pro) add the lib path

    LIBS += -L/path -lqwt

  3. #3
    Join Date
    Sep 2009
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: problem in .o and moc files

    thanks for the help, but that ain't the problem I've already done that

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

    Default Re: problem in .o and moc files

    Run qmake after making sure the header files contain Q_OBJECT macro in class declarations.
    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
    Sep 2009
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: problem in .o and moc files

    thanks, but I've checked and that ain't the problem either

Similar Threads

  1. Eclipse, Moc Files, Custom Build Steps
    By gmat4321 in forum Qt Programming
    Replies: 4
    Last Post: 6th August 2010, 05:25
  2. How to avoid creation of MOC files on each compilation
    By nileshsince1980 in forum Qt Programming
    Replies: 4
    Last Post: 29th May 2009, 08:00
  3. Replies: 0
    Last Post: 23rd April 2009, 09:38
  4. moc with same file names?
    By cjhuitt in forum Qt Programming
    Replies: 9
    Last Post: 27th April 2007, 20:36
  5. Visual Studio 2003 and .vcproj files
    By mbjerkne in forum General Discussion
    Replies: 2
    Last Post: 1st February 2006, 00:51

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.