Results 1 to 6 of 6

Thread: Link errors for plugin under windows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Oct 2008
    Posts
    70
    Thanks
    1
    Thanked 9 Times in 9 Posts

    Default Re: Link errors for plugin under windows

    You're welcome!

    Please see http://doc.trolltech.com/4.4/moc.html

    Writing Make Rules for Invoking moc

    ....
    For Q_OBJECT class declarations in implementation (.cpp) files, we suggest a makefile rule like this:

    foo.o: foo.moc

    foo.moc: foo.cpp
    moc $(DEFINES) $(INCPATH) -i $< -o $@

    This guarantees that make will run the moc before it compiles foo.cpp. You can then put

    #include "foo.moc"

    at the end of foo.cpp, where all the classes declared in that file are fully known.

  2. The following user says thank you to pastor for this useful post:

    QPlace (2nd November 2008)

Similar Threads

  1. Link errors when linking chained libraries on windows
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 26th May 2008, 14:52
  2. Q_OBJECT macro and link errors
    By pscheven in forum Qt Programming
    Replies: 4
    Last Post: 21st March 2008, 13:23
  3. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04

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.