omegasbk
omegasbk

Reputation: 906

Running .exe without copying .dlls

I have Visual Studio 2015 solution ready for delivery. I have a requirement that the .exe should run out of the box. However, I am getting "missing dll..." errors. Is there any way I could make it possible for someone to run the exe without him needing to download bunch of ddls? Can I build the .exe to be executable as stand-alone somehow?

Upvotes: 5

Views: 6088

Answers (1)

Mahesh
Mahesh

Reputation: 34645

Yes, you have to statically link the binary. In the project settings (Configuration Properties -> C/C++ -> Code Generation), use /MT, /MTd for the Release, Debug configurations respectively. However, this bloats the size of the executable.

MSDN documentation on /MT, /MTd options

Upvotes: 6

Related Questions