I wrote a very small utility program in C++. I chose C++ for two reasons: to keep .exe size as small as possible and to ensure zero framework dependencies. I just want this to execute as fast as possible with 100% compatibility.
Unfortunately a user has now received an error saying they need MSVCP140.DLL to run the program. I know this is one of the VC++ redistributable packages, but I'm surprised to learn that such a simple console program requires something that's not a default part of Windows.
Is it possible to write dependency-free Windows code? How do I generate a 100% Windows-native .exe file?
From what I've read this may be related to either or both of MFC or ATL and that a solution can be to include them in your release. Is it possible to just turn them off instead? I don't need or want either. (Or maybe MFC is required under the hood for the console window itself?)
Mostly I'm just surprised that it almost seems like there is no such thing as a program that can run completely independently. How can I generate a small program that is completely framework independent?