4 ms·
C++ does usually require a runtime.
by swills 12y ago
C++ does usually require a runtime.
- yoklov 12y agoC++'s runtime is small and ubiquitous. Depending on how the software is written (if it allows disabling exceptions and rtti), it might be the same size as C's runtime, which is practically (but not totally) nonexistant. I'm not an expert on Java, but my experience with it is that it's runtime is fairly huge and requires custom installation.
- swills 12y agoWhich C++ runtime is ubiquitous? I can think of at least 3 C++ runtimes (MS, libstdc++, libc++).
- bandrami 12y agoC++'s runtime is worse than Java's in that sense. Most JVMs can run most Java bytecode, but your libstdc++ has to be from the same version of the same compiler that your application was compiled with.
- Alupis 12y agoIt was quite surprising for me the first time I did a little embedded work and discovered I couldn't run binaries that were compiled against glibc on my musl-libc based system, and vice-versa. I had initially thought they all just supported the same c89 spec so should work...
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- bandrami 12y agoYep. It's 99% ABI compatible, but that 1% will kill you. For that matter, as you allude even C has a runtime.
- deleted 12y ago[deleted]