Re: /clr:pure and unmanaged lib



"Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx> wrote in message news:OddEyErBIHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
But this does not mean, that you do not need to redistribute the vcredist_x86.exe if you compile with "/clr".


If you are building against a newer version, somehow you'll have to add the VC runtime too (or link statically).

I assume that the mscor*.dll are linked agains the RTM (or previous) version of the CRT. So if you build your app with VS2005SP1, you need to deploy the SP1 DLLS...


Yep.

Unless you use redirection. The public interface isn't changed, so you can use any version of the VC8 runtime -- as long as you manifest is set that way.


Agreed.

But because the VC8 runtime is backward compatible, there is no excuse for Microsoft not to include the newer dlls in the next .NET 2.0 patch. If they are compiling patches to .NET 2.0 using RTM.... that's bad news, there were a lot of compiler and library bugs fixed in SP1.


The actual patches are compiled with the vs2005 SP1 bug fixes (and more) included. With Orcas comes a new version of the CLR including more fixes and a new version of the VC run time.


I general you can say:
If you compile with /clr:pure, you only need the .NET-Redistributable.
Otherwise you also need the vcredist_x86.exe
Also if you use MFC/ATL/OpenMP, you need to use vcredist_x86.exe


Nope, a pure is not MSIL only assembly, "pure" assemblies still have the VCRT linked in, take a look at the assembly manifest generated by the compiler, this manifest contains the assembly's depencies, something like.

Pure is MSIL only, but the CRT includes an MSIL version of some functions, so the dependency still exists.


It was my understanding that the C compiler team had reserved the right to "inject" MSIL as well as native code whenever they see fit.
I remember this was done to allow them to inject native code when MSIL was't really an option, I'll try to find the source of this info and post back when I've found it. In the mean time consider my understanding to be wrong.

Willy.



.



Relevant Pages

  • OT: Danke :-)
    ... Compiler erzeugt wurde auch immer mit der passenden CRT ... Aber auch der GCC und sein Linker will wissen, was er in welcher Form als Entry-Point in die PE schreiben soll. ... 90% von Windows besteht nur noch ...
    (microsoft.public.de.vc)
  • Re: D3/Linux compile question
    ... consider zero a valid array element while the Prime flavors do. ... 02 EQUATE ZERO TO ARRAY ... 07 CRT ARRAY ... Compiler catches line 6 and 13 as subscript out of range. ...
    (comp.databases.pick)
  • Re: Running VB6 exe on Windows 7 64bit
    ... I've Googled around and discovered what data needs to go into the manifest to signify that your app is dpi-aware, but I don't know how to embed the manifest into the compiled VB exe file as MMM can do with its RegFree COM manifests. ... The manifest file has to be embedded as a resource into the exe. ... Basically the .rc file among other things can tell the resource compiler which files to include in the compiled resource file. ... In the meantime perhaps Google (eg. "Resource file for embedding manifests") could help. ...
    (microsoft.public.vb.general.discussion)
  • Re: Linkerproblem, wenn wmain/wWinMain in Lib stecken
    ... Von einer CRT steht da ... Compiler erzeugt wurde auch immer mit der passenden CRT ... trotzdem durchsucht der Linker nicht die Lib nach ...
    (microsoft.public.de.vc)
  • A solution to the MSVCRT vs MSVCR71 problem?
    ... Compile with your compiler or choice, never mind which CRT are used. ... DLL file. ... redirects CRT calls to msvcrt.dll or any other CRT of choice. ...
    (comp.lang.python)

Quantcast