开发者

Visual Studio 2010 and QT 4.7.1 static link

开发者 https://www.devze.com 2023-02-03 03:35 出处:网络
There is a problem, app still need MSVCR100.dll and MSVCR100.dll. Build QT source: set QMAKESPEC=win32-msvc2010

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 ins开发者_如何学Gotall i am setuping my project ans set options to /MT /ZI. Still - my project wants MSVCR100.dll and MSVCR100.dll.


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


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消