Hacker News new | ask | show | jobs
by integricho 28 days ago
Have you checked what dll dependencies you get if you build such an app? And have you actually tried running such an executable on win9x?
1 comments

If you use only Win32 APIs from C++ just like since Petzold books, the dlls are already there, there is also static linking for other stuff.

Win 9x is a dead OS, why would I bother with that outside retro computing?

Understood, yes, but I described my reasons in my reply to another comment already. Your proposed solution is not equivalent to what I am doing, it cannot work on all the systems I support, and would never be as dependency free.
I fail to see why, as I have been doing C++ on Windows since Windows 3.0.

I only don't consider legacy Windows platforms something to care about, and put the required effort into making something like that happen.

Even trivial stuff causes the linking to vcruntime, this is an extra dll dependency that I don't tolerate, no msvcrt, no vcruntime, nothing except core Win32 dlls are allowed on the platform. Static linking can relieve some of this pain, but that bloats the binary. C++ simply does not allow the same level of minimalism that can be achieved by C, and for many these are unimportant details, for me they are deal breakers and this is a core pillar of my architecture.
First of all VC++ isn't the only C++ compiler on Windows, as it isn't like UNIX with the one true compiler original approach, secondly there are ways with the compiler and linker flags.

I have been avoiding C as much as possible since 1992, starting with Turbo C++ for MS-DOS.

Anyway, to each its own, all the best.

Sure, just to clarify, I am not arguing that c++ doesn't work, only that c++ produced binaries are either having more dll dependencies, or are more bloated (in size). I also tried clang-cl and MingW, and while both work, the binaries produced by them are even larger then any MSVC produced (regardless of how I try to optimize it). C is a winner when it comes to binary size.