PDA

View Full Version : Static Qt with static CRT (VS 2008)



JacekFx
14th June 2010, 14:30
Hi All,

Recently I decided to use statically linked Qt in one of my applications (compiled with VS2008). I used following command to configure compilation:

configure -static -platform win32-msvc2008 -no-webkit
It works fine, but Qt libs are still referring to "multithreaded DLL" and "multithreaded debug DLL" CRT and this conflicts with my project settings.
Is there a way to changed it to "multithreaded" and "multithreaded debug" ?

BR,
JF

JacekFx
14th June 2010, 16:23
To be precise I want to compile Qt with compiler option /MT and not /MD.
Is this possible to set it somewhere ?

high_flyer
14th June 2010, 16:29
Project Properties->Configuration Properties->C++->Code generation->Runtime library

JacekFx
14th June 2010, 16:56
Hi. That was a nice clue. I always used nmake to compile Qt, but indeed it is possible to open vcproj, change it and compile under IDE. Thanks.

Lesiok
14th June 2010, 17:18
Or look at file

%QDIR%\mkspecs\win32-msvc2008\qmake.conf

and just replace -MD with -MT in lines QMAKE_CFLAGS_RELEASE and QMAKE_CFLAGS_DEBUG :cool:

JacekFx
15th June 2010, 13:57
Thanks. That was even better. I changed the file, typed:


namake confclean
configure -static -platform win32-msvc2008 -no-webkit
nmake sub-src

and hour later I was ready to go :).