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. How to distribute a DLL developed using the Qt Core and GUI
QtWS25 Last Chance

How to distribute a DLL developed using the Qt Core and GUI

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 870 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.
  • W Offline
    W Offline
    Wolff
    wrote on last edited by
    #1

    Hi,

    I create a Dll , that will be used by other applications outside of Qt enviroment , and usually my dll´s goes with a .lib file, the .dll file itself and all the Include files insde of the Include folder.

    But this dll uses QString and QVector2S objects declared in core and gui components, so i will need redistribute the dll´s too, but the include files? This is the first time i try redistribute a dll created in Qt.

    I need redistribute all Qt include files? How this can be made? probabli this objects have theire dependencies...etc...

    Any help?
    Kind Regards.
    Wolff

    artwawA 1 Reply Last reply
    0
    • W Wolff

      Hi,

      I create a Dll , that will be used by other applications outside of Qt enviroment , and usually my dll´s goes with a .lib file, the .dll file itself and all the Include files insde of the Include folder.

      But this dll uses QString and QVector2S objects declared in core and gui components, so i will need redistribute the dll´s too, but the include files? This is the first time i try redistribute a dll created in Qt.

      I need redistribute all Qt include files? How this can be made? probabli this objects have theire dependencies...etc...

      Any help?
      Kind Regards.
      Wolff

      artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by
      #2

      @Wolff Hi, I'd start by including QtCore and QtGui dll files. If that still doesn't work (almost certainly will fail, there are other dlls that might be needed) you can use DependencyWalker to see what's missing. Should not be much more than those two files though.

      For more information please re-read.

      Kind Regards,
      Artur

      W 1 Reply Last reply
      0
      • artwawA artwaw

        @Wolff Hi, I'd start by including QtCore and QtGui dll files. If that still doesn't work (almost certainly will fail, there are other dlls that might be needed) you can use DependencyWalker to see what's missing. Should not be much more than those two files though.

        W Offline
        W Offline
        Wolff
        wrote on last edited by
        #3

        @artwaw , my problem is not distribute the dll, but the system who will use my Dll will have a Header file with #include<QString> , for example, and this system will not find.
        My concern is there is a way to get only the used header files, like we do with windeployqt.exe or something like that...
        If not i will need create an include folder with the dll´s and copy there all the necessary include files etc...

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

          Hi,

          Does your library use these classes only internally or do they expose it in its API ?

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

          W 3 Replies Last reply
          0
          • SGaistS SGaist

            Hi,

            Does your library use these classes only internally or do they expose it in its API ?

            W Offline
            W Offline
            Wolff
            wrote on last edited by
            #5

            @SGaist , expose it, becouse i´m using it on the Library Interface object being exported by by the Dll.

            1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              Does your library use these classes only internally or do they expose it in its API ?

              W Offline
              W Offline
              Wolff
              wrote on last edited by
              #6

              @SGaist , For example, one of the main Dll functions receive a QString object informing the path to load some files. when i try compile it on the target system i will receive am compilation error not finding the QString object, etc...

              1 Reply Last reply
              0
              • SGaistS SGaist

                Hi,

                Does your library use these classes only internally or do they expose it in its API ?

                W Offline
                W Offline
                Wolff
                wrote on last edited by
                #7

                @SGaist , just to complement, when i create the dll, the declaratrions os ExportDll are using the #include <QtCore/qglobal.h> so basically how i can develop an C++ dll API to be used in in other systems using other C++ Compilers, etc? what is the best way to do that? remove everything related to Qt , including the External Macros and make it ANSI? , or i have an way to distribute the Qt Libraries that make possible i distribute it with my dll?

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

                  If you expose Qt classes with you either have to point your users to the Qt SDK or provide your own minimal SDK that includes the modules you are using (with header and all).

                  For multiple compilers support you'll have to do the same as Qt and provide your library for all the ones you want to support.

                  Another possibility is to use a tool like Conan to distribute it.

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

                  W 1 Reply Last reply
                  1
                  • SGaistS SGaist

                    If you expose Qt classes with you either have to point your users to the Qt SDK or provide your own minimal SDK that includes the modules you are using (with header and all).

                    For multiple compilers support you'll have to do the same as Qt and provide your library for all the ones you want to support.

                    Another possibility is to use a tool like Conan to distribute it.

                    W Offline
                    W Offline
                    Wolff
                    wrote on last edited by
                    #9

                    @SGaist , Thanks so much!
                    I will take a look at conan , however i think is better replace the Qt objects with standard data. they are being used only for Dll interface.

                    Again, Thanks so Much!
                    This thread can be considered closed. ;)

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

                      You can still use Qt for the backend, just use standard STD types in the API and you'll just have to deploy the required .dlls.

                      Good luck :-)

                      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
                      0

                      • Login

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