1

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

Build QT source:

  • set QMAKESPEC=win32-msvc2010
  • configure -platform win32-msvc2010 -static
  • nmake

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

DmitryM
  • 207
  • 4
  • 12
  • There shouldn't even be a linking step when building a static library. Instead the library manager tool `lib.exe` collects all the `.obj` files into a `.lib`. What exactly are you expecting? – Ben Voigt Jan 10 '11 at 06:04

2 Answers2

2

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

Alex
  • 380
  • 2
  • 12
0

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)

Martin Beckett
  • 90,457
  • 25
  • 178
  • 252