Results 1 to 6 of 6

Thread: Link to plugin as dynamic lib in another plugin

  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Link to plugin as dynamic lib in another plugin

    Is it possible to link to a plugin as dynamic library in another plugin!? When i do that i get unresolved external error (Qt5 Rc1)

  2. #2
    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: Link to plugin as dynamic lib in another plugin

    Yes, it is possible. If you're using Windows then maybe you're missing some exports.
    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.


  3. #3
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Link to plugin as dynamic lib in another plugin

    I have a PluginA and PluginB. Both works perfectly fine and loads in QtCreator. But when add PluginB in PluginA and include a class of pluginB in a class in pluginA, i got unresolved external error.
    What am i missing?

  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: Link to plugin as dynamic lib in another plugin

    Check the exports/imports.
    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
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Link to plugin as dynamic lib in another plugin

    Thanks wysota, but can you tell me clearly what do you mean by exports/imports? Should i add some extra macros for imported plugin?!

  6. #6
    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: Link to plugin as dynamic lib in another plugin

    See Q_DECL_EXPORT/Q_DECL_IMPORT.
    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.


Similar Threads

  1. Dynamic plugin: accessing parent's methods
    By codeslicer in forum Qt Programming
    Replies: 1
    Last Post: 4th January 2011, 09:16
  2. Dynamic widget plugin
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 30th April 2009, 18:26
  3. Problem building dynamic plugin
    By javd in forum Qt Programming
    Replies: 3
    Last Post: 6th April 2009, 18:02
  4. Link errors for plugin under windows
    By QPlace in forum Qt Programming
    Replies: 5
    Last Post: 2nd November 2008, 15:51
  5. Link problems with static MySQL plugin
    By nurtsi in forum Installation and Deployment
    Replies: 4
    Last Post: 20th September 2007, 15:32

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.