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. Windows DLL and QT Question

Windows DLL and QT Question

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 331 Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    QtCoder87
    wrote on last edited by
    #1

    Hallo,

    when the Programm starts all DLLs will be loaded. they are in the same directory as the executable.

    Now my question is:
    If I make a plugin system and the plugins are in subfolder plugins will they be able to access qt classes? Or do they need to have own copy of the dll in their folder?

    MyApp folder

    • Plugins\
      • Plugin1.dll
      • Plugin2.dll
    • myApp.exe
    • all qt.dlls
    1 Reply Last reply
    0
    • Cobra91151C Offline
      Cobra91151C Offline
      Cobra91151
      wrote on last edited by
      #2

      Hello!

      The plugins dynamic (shared) libraries should be added to your project and should be available in the application directory, otherwise it cannot find it to use. For example (MyProject.pro):

      LIBS += -L"your plugins path" -lpluginlibname

      Happy coding!

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Are you using Qt's plugin system ?

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

        Q 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Are you using Qt's plugin system ?

          Q Offline
          Q Offline
          QtCoder87
          wrote on last edited by QtCoder87
          #4

          @SGaist said in Windows DLL and QT Question:

          Hi,

          Are you using Qt's plugin system ?

          Not at the moment.

          long time ago I wrote a Template called library_ptr which is practically a smart pointer for DLL and Interface. if you have 2 Classes in a dll it can load the second class as child_ptr which only destroys the class at the end and not the dll handle.

          If I call SetDllDirectoryW inside the Executable will it also apply for DLLs?

          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