How to distribute a DLL developed using the Qt Core and GUI
-
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 -
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@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.
-
@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.
@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... -
Hi,
Does your library use these classes only internally or do they expose it in its API ?
-
@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?
-
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.
-
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.
-
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 :-)