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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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