3 ms·
Why does a program compiled with VS need a specific DLL anyway? Can't VS compile FOR Windows, with only the DLLs Windows provides by default?
by Aardwolf 13y ago
Why does a program compiled with VS need a specific DLL anyway?
Can't VS compile FOR Windows, with only the DLLs Windows provides by default?
- ygra 13y agoSure, just don't link against the C++ runtime library and you're good. Of course, you won't have anything said runtime lib provides, then. Or link the runtime statically, as suggested in a few other posts. Your binary size will increase then, though.
- to3m 13y agoHere's an article about it: http://www.drdobbs.com/avoiding-the-visual-c-runtime-library/184416623 http://www.drdobbs.com/avoiding-the-visual-c-runtime-library... Without the runtime library, strictly speaking you're no longer programming C or C++, hence the surprises...
- maxerickson 13y agoThat's what the article is about, why they decided to not have VS link against the OS runtime. At some point, the decision was made to just give up and declare it an operating system DLL, to be used only by operating system components. Makes it clear enough that it was a choice they made, with the big reason being the effort required to maintain compatibility across so many systems and compilers. My knowledge of it never really got past the poking-with-a-stick stage, but apparently (at least some of) the windows SDK compilers were able to link to the system runtime well after they made the switch in VS.