Thursday, July 27, 2006

Avoid Dependency with Visual Studio 2005 Runtime

On windows XP i recently face some problems to register and deploy a CAB and underlying Active X Control on a PC running Windows XP. I was using Visual Studio 2005 to build my COM Object. To avoid conflict i recommend to statically link.

In the project settings property page choose C.C++ then Code Generation then
for Runtime Library choose Multi-threaded (/MT).

For stand alone application you can copy the visual studio distribution files in the same folder
than your binary (exe or dll) and you should be good to go.

\Program Files\Microsoft Visual Studio 8\VC\redist\x86

Be sure to distribute the manifest files as well if you are planning to use the /clr mode.

No comments: