3 ms·
> Basically "ldd $file" needs to say "not a dynamic executable". Also, no dlopen(). so, uh, what's wrong with g++ -static foo.cpp ? Note that however you canno
by jcelerier 4y ago
> Basically "ldd $file" needs to say "not a dynamic executable". Also, no dlopen().
so, uh, what's wrong with g++ -static foo.cpp ? Note that however you cannot make something that will make any use of OpenGL if you do this as you would have to link statically against the GL implementation, thus forcing a specific driver and requiring a specific graphics card. It's also not possible at all on windows and macOS (unless you restrict to a specific point release there).
- my123 4y ago> so, uh, what's wrong with g++ -static foo.cpp glibc is LGPL, so license incompatibility might ensue if you aren't using musl. And it's far more than just OpenGL as an issue, there's PAM too among other things. Windows and macOS don't have stable syscall ABIs in the first place.
- jcelerier 4y agoLGPL can be statically linked with non-gpl-compatible code. https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDynamic https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDyn...
- my123 4y agoFor proprietary code, shipping object files often gives out details that the vendor explicitly doesn't want to be released. So unless the vendor has a specific toolchain for stripping info from those (like NVIDIA for their kernel modules...) not a good option :/