Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C and C++ will produce statically linked binaries if you ask nicely (gcc -static).

There are some traps though; one I ran into for example is that you require dynamic linking in order to use libnss. I ended up producing a mostly-static binary that just depended on the platform's libc but brought its own libstdc++.

Similarly on Windows, statically linking third-party COM components is not a good idea.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: