Search code examples
c++visual-studio-2008redistributable

Why won't my program run unless Visual Studio 2008 is installed?


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

Why is this?


Solution

  • Most likely you're linking with DLL versions of the C/C++ runtime. Go to project properties -> C++ -> Code Generation, and set Runtime Library to not be one of "DLL" kinds.

    Alternatively, you can link to DLL runtimes, but then you have to redistribute the runtime with your application.

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

    Also, Dependency Walker (depends.exe) will show what libraries your executable depends on. It ships with some versions of Visual Studio as well.