Why won't my program launch if Visual Studio 2008 is not installed?

I've written a game that uses GLUT, OpenGL, and FMOD. The problem is that the binary won't run if Visual Studio 2008 is not installed on the computer.

Why is this?

+4


source to share


7 replies


You are most likely linking to DLL versions of the C / C ++ runtime. Go to project properties -> C ++ -> Code Generation and set the Runtime Library to not be one kind of DLL.

Alternatively, you can reference the DLL runtime, but then you need to reallocate the runtime with your application.



MSDN has more information on various aspects of deploying C ++ applications: http://msdn.microsoft.com/en-us/library/zebw5zk9.aspx

Also, Dependency Walker (.exe depends) will show you which libraries your executable depends on. It comes with some versions of Visual Studio.

+11


source


You mean why Microsoft Visual C ++ 2008 Distribution Package (x86) is needed

This package installs the C Runtime Components (CRT), Standard C ++, ATL, MFC, OpenMP, and MSDIA Libraries. For libraries that support the parallel deployment model (CRT, SCL, ATL, MFC, OpenMP), they have an assembly-installed cache, also called the WinSxS folder, on versions of the Windows operating system that support side-by-side assemblies.

Because they are not installed on all Windows by default, especially the ones shipped before VS 2008.



Even for

cout << "Hello, World" << endl;

      

You need a library, which in this case is the C ++ standard library.

+5


source


Welcome to the wonderful world of application deployment.

Run the tool depends on your executable and it will tell you which DLLs you need to copy along with the EXE as well.

+3


source


This program can help you find which DLLs (if any) are missing from the computer that it will not run on

+3


source


By default, only the release versions of the C runtime and the C ++ standard libraries are installed. Installing Visual Studio will additionally install the debug versions.

Make sure the version you are deploying is fully built in release mode.

+2


source


Try compiling in release mode and make sure all required DLLs are installed on the target machine. This works for me.

+1


source


Do you have dependencies on the debug libraries?

0


source







All Articles