[Interest] Whats the difference between compiling with /MD and /MT?

Nuno Santos nunosantos at imaginando.pt
Thu Oct 8 21:38:22 CEST 2015


I have added:

LIBS += LIBCMT.lib

And it's now linking fine...

On 08/10/2015 20:29, Nuno Santos wrote:
> Hi,
>
> Today I have built Qt statically with the option -openssl-linked. My 
> first option was to link with the MD versions of libs because Qt is 
> using /MD during the build process. After a successfull compilation of 
> Qt I have built the a static plugin I'm working on but the host 
> software couldn't find it. I couldn't tell why.
>
> The other day I found someone who changed the msvc-desktop.conf to use 
> /MT instead of /MD. From what I have read in Microsoft documentation 
> and all around there, if I want to statically link with the MSVC 
> runtime, not depending on the installation of the run time, I need to 
> use the /MT flag.
>
> I have decided to give it a try and after rebuilding Qt with /MT 
> instead of /MD, and then rebuilding my plugin again, it is now 
> detected by the host. However, when I try to compile it in Release 
> Mode I have thousands of errors:
>
> thousands of *unresolved external symbol __purecall*
> thousands of *unresolved external symbol "void __cdecl operator 
> delete(void *)" (??3 at YAXPAX@Z)*
>
> What does this mean? Why is it able to compile in debug but not in 
> release? Can someone kindly explain me the differences and 
> implications of /MD and /MT?
>
> Thanks,
>
> Regards,
>
> Nuno
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151008/55dca42f/attachment.html>


More information about the Interest mailing list