How to choose which version of the Visual C ++ libraries compiled?

I am using Visual Studio 2008 for C ++. At compilation, Visual Studio compiles to the VC 9.0 library header files. However, there are different versions of this library:

  • v9.0.21022.8 (= RTM)
  • v9.0.30729.17 (= SP1)
  • v9.0.30729.4148 (= SP1 with security update)

I would like to know if it is possible to tell Visual Studio which version it should compile.

I think this is important because the application installer needs to make sure that the correct version of the Microsoft Visual C ++ 2008 redistributable package is installed. For me, it seems like I am not controlling this dependency, as there are apparently some Windows updates (not Visual Studio updates) can change this dependency. I would like to use the same version to avoid the overhead of making the installer update the Redistributable Package.

Please note that this situation is different from the previous question , as it was about link time. I am also not looking for a way to control the version that fits in the embedded manifest file, as this is explained here .

+3
source share
4 answers

the manifest included in your binaries is automatically generated by the VS build system. Important headers defining the dependency of the version that is emitted in the manifest are vc \ include \ crtassem.h and crtdefs.h. The first is the CRT version. Note that it already supports the RTM version and the “latest” version with the _BIND_TO_CURRENT_CRT_VERSION macro. The latter contains #pragma comment directives for inserting the linker / manifestdependency option into the .obj file, which in turn causes the linker to automatically generate a manifest.

, , , . CRT, . , . , - CRT, , . , , , , .


, , - DLL. DLL WinSxS.

, , , . Windows, , , DLL . . , , , . , MSFT DLL, , , , . , .

+2

, . , , , .

+1

1 (SP1), . Microsoft , , . , .

, - . , . , .

, . . , C/++/Code Generation , .

, -DLL- . DLL , , .

+1

, , XML.

, (, , ), , . , , .

Update0

MSDN , .

0

Source: https://habr.com/ru/post/1734084/


All Articles