DmitryM
DmitryM

Reputation: 217

Visual Studio 2010 and QT 4.7.1 static link

There is a problem, app still need MSVCR100.dll and MSVCR100.dll.

Build QT source:

After install i am setuping my project ans set options to /MT /ZI. Still - my project wants MSVCR100.dll and MSVCR100.dll.

Upvotes: 1

Views: 4883

Answers (2)

Alex
Alex

Reputation: 389

It is supposed to be that way.

From the QT documentation:

"Qt is built using the -MD(d) switch, which links against the dynamic C/C++ runtime libraries. This is necessary as we have experienced memory problems when using anything but the -MD(d) flag, and in general, it is recommended to use. You should not alter this flag yourself for your application, because it conflicts with how the Qt library is built if you change the flag to -MT. You should not change it for Qt either, since it is likely to cause problems"

More info can be found here:

http://qt-project.org/faq/answer/why_does_a_statically_built_qt_use_the_dynamic_visual_studio_runtime_librar

Upvotes: 2

Martin Beckett
Martin Beckett

Reputation: 96119

You are supposed to use the dll versions of these libraries and include the redistributable support install - it's the microsoft prefered way for several reasons (mostly to do with security updates)

My guess is that even with -static Qt uses some runtime component that uses the dll (possibly webkit or the multimedia classes that use MS features)

Upvotes: 0

Related Questions