Qt: How to create a Windows DLL (which exports functions)?

I need to create a Windows DLL that exports functions and has a graphical user interface. The reason for the GUI in a DLL is that the DLL serves as a kind of plugin for another third-party application. Currently, I only have access to Visual Studio Express, which AFAIK does not support MFC, so I'm looking for alternative ways to create a GUI in a DLL. After some research, I came across Qt, which seems promising. And it seems that it would be easier to use the Qt Creator IDE rather than Visual Studio Express.

However, how do I create a Windows DLL in Qt Creator? (I think a regular DLL, I don't think COM or a managed DLL will work)

UPDATE: I got this job! After jumping through several hoops, two important keys should have added

#include <windows.h> 

And then use the Math Migration Framework tool (currently officially available at: http://qt.gitorious.org/qt-solutions/qt-solutions/trees/master/qtwinmigrate EDIT: I believe this is a new link: https : //github.com/qtproject/qt-solutions/tree/master/qtwinmigrate )

I used this example to make me move:

http://doc.qt.nokia.com/solutions/4/qtwinmigrate/winmigrate-qt-dll-example.html

EDIT: I believe this is a new link http://htmlpreview.imtqy.com/?https://github.com/qtproject/qt-solutions/blob/master/qtwinmigrate/doc/html/winmigrate-qt-dll- example.html

+8
c ++ qt dll qt4 qt-creator
source share
2 answers

Add the following line to the .pro file: TEMPLATE = lib

This is almost all you need to do to make QtCreator turn your application into a DLL.

+11
source share
-one
source share

All Articles