C ++ program runs on XP SP2 only after installing Visual Studio

I have a C ++ program. It's pretty simple - shows an image (splash screen) and launches another app, then exits when another app launches. Actually, this one: http://www.olsonsoft.com/blogs/stefanolson/post/A-better-WPF-splash-screen.aspx with very minor changes (my splash image and my program run instead of the sample).

It works fine on my Windows 7 developer machine. Also it works on another (virtual) machine with Windows XP SP2 and Visual Studio 2008. But it doesn't work on the same virtual machine with Windows XP SP2 without Visual Studio. It shows the error: "The memmove_s entry point could not be located in the dynamic link library msvcrt.dll".

I found that the problem is possible in the WindowsCodec DLL (there is no such DLL in the explicit XP SP2 installation, but it is in the Windows / system32 XP SP2 folder with Visual Studio), so I copied it to the application folder on the transparent system. After that, the program partially works (launches another application after launch), but does not display the splash image.

Installing Microsoft Visual C ++ Redistributable Package (both 2008 and 2010) didn't help.

I found a recommendation to use static linking in Visual Studio ( Multi Threaded (/ MT) option in project properties -> C / C ++ -> Code Generation), but it doesn't help either.

Also I've tried DependencyWalker but can't find any dependency differences for both test systems.

Anyone have any ideas why this might be happening? I am completely new to C ++, hope this is something obvious that I just don't know ...

+3


source to share


2 answers


Your program depends on the .NET framework, at least version 3.0. This is not available with the default XP SP2 installation. If you don't see windowscodecs.dll, you haven't installed the correct version of .NET. This works when you install VS2008 because it installs .NET as well.



Download here .

+3


source


C ++ programs become dependent on the specific versions of the crt library with which it was compiled. If the running system does not have this version in the local program directory or in the WinSxS systems directory. This is a particular problem with C ++ runs compiled using VS 2005 or 2008. See here for more information: http://en.wikipedia.org/wiki/Side-by-side_assembly



Perhaps this problem will go away if you are using VS 2010 as it uses a different method to resolve dependencies.

+1


source







All Articles