W
W
Whiteha2015-03-06 21:11:08
Qt
Whiteha, 2015-03-06 21:11:08

What is the correct way to transfer a C++ dll project from MS Visual Studio to Qt Creator?

I have a dll project written in a studio in pure C ++, I actually needed to integrate some Qt features into it, and for this it was decided to finally migrate the project to Qt creator, in order to continue development from there.
To begin with, I simply transferred the sources to a separate folder and created a .pro file from them, adding to it:

TEMPLATE = lib
TARGET = LogonProvider
DEFINES -= UNICODE
DEFINES += LogonProvider_LIBRARY
CONFIG += libs dll
+= -lsecur32 -ladvapi32 -luser32 -lole32 -lshlwapi
#<...> Source list here

Everything is assembled, with one small exception - the output dll weighs only 33Kb, instead of the required ~ 1Mb that the studio gives out, while the linker does not give any errors, and the resulting library does not work accordingly, when you try to load it, DllMain does not go further. I tried to directly take parameters from the studio for compilation and linking, but either I'm doing it wrong, or the weather on Mars is bad - the result was the same. I don’t understand why this is so, because Qt uses the same studio compiler that everything is assembled and linked from the studio with. It is logical to assume that the problem is still in the compilation and linking keys, but how to transfer them from the studio to Qt creator?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Martyanov, 2015-03-07
@vilgeforce

Does the studio have static linking? Although with the dynamics of LoadLibrary it should already break off ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question