Results 1 to 3 of 3

Thread: linking problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default linking problem

    Hi,

    I have the following case:
    Class MTelemetry is defined in an H file, at the moment its an empty class, implementing the defalut constructor and destructor in the H file it self, so there is no implementation file for it.
    I subclass it to class MServCon.
    Compiling goes well, but the linker complains:
    obj/mservcon.o: In function `MServCon::MServCon(QObject*)':
    mservcon.cpp.text+0x14): undefined reference to `vtable for MTelemetry'
    MServCon includes mtelemetry.h.

    I tried adding a forward declaration to MServCon, didn't help.
    What I might be missing?
    Here is the link line:
    g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.1.4/lib -o TMServCon obj/main.o obj/mservcon.o obj/moc_mservcon.o -L/usr/local/Trolltech/Qt-4.1.4/lib -lQtNetwo
    Thanks.

    Ofcourse one second oafter I posted I realized the problem - MTelemetry didn't get moc'ed...
    Last edited by high_flyer; 4th August 2006 at 23:09.

Similar Threads

  1. Permission denied error during linking
    By bashamehboob in forum Newbie
    Replies: 2
    Last Post: 15th April 2006, 13:02
  2. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  3. Replies: 16
    Last Post: 7th March 2006, 15:57
  4. Replies: 4
    Last Post: 20th February 2006, 09:11
  5. Runtime dynamic linking + Qt4 problem
    By _Ramirez_ in forum Qt Programming
    Replies: 5
    Last Post: 11th February 2006, 14:28

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.