Boost logo

Boost-Build :

Subject: Re: [Boost-build] MSVC runtimes (was: [boost] Boost build problem)
From: Matthew Chambers (matthew.chambers_at_[hidden])
Date: 2009-09-28 12:05:27


Michael Weber wrote:
> On Mon, Sep 28, 2009 at 12:41 AM, Johan Nilsson
> <r.johan.nilsson_at_[hidden]> wrote:
>
>> Ian Emmons wrote:
>>
>>> Starting with Visual Studio 2005 (msvc-8), linkage to the run-time
>>> libraries depends on Microsoft's infrastructure for side-by-side
>>> execution of different versions of the same DLL. This is Microsoft's
>>> attempt to solve the "DLL Hell" problem, in which an executable
>>> transparently links to the first instance of a DLL found on the path,
>>> independent of any version dependency. Clearly, this is a big
>>> advance, but it comes at the cost of complexity. As far as I know,
>>> the only way to deploy the C/C++ run-time is to install the .Net
>>> framework (which contains the side-by-side execution infrastructure).
>>> So EXE's and DLL's built with Visual Studio 2005 (msvc-8) require
>>> the .Net 2.0 run-time, and those built with Visual Studio 2008
>>> (msvc-9) require .Net 3.5.
>>>
>> AFAIK, .NET runtime is not needed for _native_ C++ applications. Just installing the runtime using the supplied merge modules (CRT + policy) should work just fine.
>>
>> IIRC it is also _possible_ (even though perhaps not officially supported) to install the needed runtime DLLs in the same directory as the executable with a specially crafted external manifest.
>>
>> / Johan
>>
>
> Installation of .net is not necessary -- Microsoft distributes
> installers for the runtime alone. Make sure you find the one specific
> to your build tool -- i.e., MSVS2005 / 2008, and with or without the
> corresponding SP1.
>
> e.g., here is the installer for MSVS2008 SP1:
>
> http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en
>
> The bottom of that page has links to 2005 runtimes, and runtimes with
> / without MSVS 200x SP1.
>
> Michael
>

You can use the latest version of each generation's redistributables to
install all versions of the runtime for that generation. The generations
are 2003, 2005, 2008, 2010. Each generation has several versions, but as
long as you install the latest version it will install all the previous
runtimes for that generation. For 2005 and 2008, the latest version is
SP1. Johan is correct that you can redistribute the runtime DLLs with
your application if you set up the manifest correctly. But if your
application depends on 3rd party binaries that compiled with different
runtime versions, then you all of a sudden have to redistribute that
version too, so it becomes a big mess. But at least if you do it that
way you don't need Administrator privileges to install. :/

-Matt


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk