Results 1 to 5 of 5

Thread: creating a dylib for a plugin with external classes

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Location
    New York
    Posts
    45
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    5

    Default creating a dylib for a plugin with external classes

    I am able to create a plugin interface and link it, and the pluginLoader likes it, but if I try to include any classes from my main app, it won't link.

    I would really like something like:


    Qt Code:
    1. #include <C.h>
    2.  
    3. class A : public AInterface
    4. {
    5. public:
    6. C *instance() { return new B(); }
    7. };
    8.  
    9. class B : public C
    10. {
    11. B() {}
    12. };
    13.  
    14. Q_EXPORT_PLUGIN2(app_A, A)
    To copy to clipboard, switch view to plain text mode 

    but I cannot figure out a way to get C.o to link when I create the dylib. It doesn't seem to make sense to add a LIBS line to the .pro that points to the .o file in:

    [objectsdir]/Release/*build/Objects-normal/i386/C.o

    because it doesn't feel right -- if I change machines, OSs, or distros it will break.

    How do I get this link to work?
    Last edited by themolecule; 21st August 2007 at 06:03.

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 10:12
  2. QPluginLoader not recognizing a plugin
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2007, 14:13
  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.