Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Plugin-based application. Best practices?
QtWS25 Last Chance

Plugin-based application. Best practices?

Scheduled Pinned Locked Moved Unsolved General and Desktop
c++pluginvisibilityexport
3 Posts 3 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manuelschneid3r
    wrote on 10 Oct 2016, 13:18 last edited by
    #1

    In a plugin-based application the core/executable has several pure virtual interface clases that plugins (dll/so) should implement. Further there are standard implementations of that interfaces, which should be accessible by the plugins.

    Do I need to export pure virtual interfaces at all? I mean they consist only of header files which the libraries include anyway at compile time. So I should not need the symbol at runtime, should I?

    How do I export variables and classes from the main application to the plugins? Does this make sense at all? What is the best practice for this case?

    This means that these symbols should be undefined in the libraries. How do I achieve this?

    K 1 Reply Last reply 10 Oct 2016, 15:59
    0
    • M manuelschneid3r
      10 Oct 2016, 13:18

      In a plugin-based application the core/executable has several pure virtual interface clases that plugins (dll/so) should implement. Further there are standard implementations of that interfaces, which should be accessible by the plugins.

      Do I need to export pure virtual interfaces at all? I mean they consist only of header files which the libraries include anyway at compile time. So I should not need the symbol at runtime, should I?

      How do I export variables and classes from the main application to the plugins? Does this make sense at all? What is the best practice for this case?

      This means that these symbols should be undefined in the libraries. How do I achieve this?

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 10 Oct 2016, 15:59 last edited by
      #2

      Hi,
      @manuelschneid3r said in Plugin-based application. Best practices?:

      Further there are standard implementations of that interfaces, which should be accessible by the plugins.

      I don't follow, what standard implementations? The idea is that the app provides the recognized interfaces, while the plugins provide the implementations.

      @manuelschneid3r said in Plugin-based application. Best practices?:

      How do I export variables and classes from the main application to the plugins?

      You don't. You "push" anything you need to the plugin from the main app through one of your interfaces (i.e. by a setter method or w/e).

      @manuelschneid3r said in Plugin-based application. Best practices?:

      Does this make sense at all?

      No, not really.

      @manuelschneid3r said in Plugin-based application. Best practices?:

      This means that these symbols should be undefined in the libraries. How do I achieve this?

      You can't link if you have "undefined symbols". So no, you don't achieve it, nor you need to. :)

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 10 Oct 2016, 19:53 last edited by
        #3

        Hi,

        To add to @kshegunov, you might be interested by the Extending Qt Applications part of the Plugin HowTo in Qt's documentation.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1

        1/3

        10 Oct 2016, 13:18

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved