[CMake] InstallRequiredSystemLibraries.cmake and Redistribution of the shared C runtime component in Visual C++

James Bigler jamesbigler at gmail.com
Thu Aug 6 13:38:55 EDT 2009


I've just been bitten hard by this issue (many hours of frustration while
attempting to run a demo application that should have "Just Worked" (TM) ).

According to this page:

http://support.microsoft.com/kb/326922


"You should install these versions of the CRT on target computers by running
the Vcredist_x86.exe application that is included with Visual Studio."  This
is for the VS 2005 and 2008 versions of the C run-time libraries except for
Windows 2000 in which case you need to install them in the system32
directory.

I was dropping Msvcr80.dll and friends as per InstallRequiredSystemLibraries
next to the binaries with ineffectual results.  It was really strange,
because programs like Dependency Walker seemed to find them just fine.  It
was only after running vcredist_x86.exe that I was able to run my programs
properly.

I though I should tell everyone that this method of distributing Msvcr80.dll
and Msvcr90.dll next to your binaries is not supposed to work.  You must
install them into the Windows Side by Side location (WinSxS) using the
CRT.msm merge module or the vcredist_x86.exe that comes with Visual Studio.

Now to try and get CPack to tell NSIS run the vcredist_x86.exe program
during installation.

Note, that many people might get lucky and have already installed a product
that installed the right vcredist_x86.exe before installing your software.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090806/0c944325/attachment.htm>


More information about the CMake mailing list