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. static plugin vs dynamic plugin
QtWS25 Last Chance

static plugin vs dynamic plugin

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 1.9k 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.
  • H Offline
    H Offline
    hjohn
    wrote on last edited by
    #1

    what is difference between static and dynamic plugin.
    in plug and paint example of Qt Document static plugin is used .
    when to use static and dynamic plugin

    1 Reply Last reply
    1
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Static plugin means its compiled into the exe and not loaded as
      a shared LIB / DLL on demand.
      Often a static linking is used if the plugin must always be
      available in the app.
      If the plugins features are more optional, dynamic can be used
      so its loaded more like on demand. And can be optional. ( not installed)
      However, with static linking, you must recompile the app if plugin changes.
      With dynamic, you only need to recompile the plugin and the app would use the new
      version.

      H 2 Replies Last reply
      5
      • mrjjM mrjj

        Hi
        Static plugin means its compiled into the exe and not loaded as
        a shared LIB / DLL on demand.
        Often a static linking is used if the plugin must always be
        available in the app.
        If the plugins features are more optional, dynamic can be used
        so its loaded more like on demand. And can be optional. ( not installed)
        However, with static linking, you must recompile the app if plugin changes.
        With dynamic, you only need to recompile the plugin and the app would use the new
        version.

        H Offline
        H Offline
        hjohn
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          Static plugin means its compiled into the exe and not loaded as
          a shared LIB / DLL on demand.
          Often a static linking is used if the plugin must always be
          available in the app.
          If the plugins features are more optional, dynamic can be used
          so its loaded more like on demand. And can be optional. ( not installed)
          However, with static linking, you must recompile the app if plugin changes.
          With dynamic, you only need to recompile the plugin and the app would use the new
          version.

          H Offline
          H Offline
          hjohn
          wrote on last edited by
          #4

          @mrjj is it mean if you want to use one plugin in multiple application you should use dynamic plugins it does not work on static plugins.

          jsulmJ 1 Reply Last reply
          0
          • H hjohn

            @mrjj is it mean if you want to use one plugin in multiple application you should use dynamic plugins it does not work on static plugins.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by jsulm
            #5

            @hjohn It works in both cases.
            The difference is: static plug-in is built into your executable (like a static lib) and dynamic plug-in is basically a shared library which is loaded at runtime.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            H 1 Reply Last reply
            2
            • jsulmJ jsulm

              @hjohn It works in both cases.
              The difference is: static plug-in is built into your executable (like a static lib) and dynamic plug-in is basically a shared library which is loaded at runtime.

              H Offline
              H Offline
              hjohn
              wrote on last edited by hjohn
              #6

              @jsulm yeah now its clear..one last question:In which specific case i should use static plugins?

              jsulmJ 1 Reply Last reply
              0
              • H hjohn

                @jsulm yeah now its clear..one last question:In which specific case i should use static plugins?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @hjohn As @mrjj said static plug-in is better if it is always need. Dynamic plug-ins are used when they are optional.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                H 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @hjohn As @mrjj said static plug-in is better if it is always need. Dynamic plug-ins are used when they are optional.

                  H Offline
                  H Offline
                  hjohn
                  wrote on last edited by
                  #8

                  @jsulm okay thanks..

                  1 Reply Last reply
                  0

                  • Login

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