3 ms·
You can get static linking in C/C++ with `gcc -static`.
by hk__2 12y ago
You can get static linking in C/C++ with `gcc -static`.
- pjc50 12y agoSort of. On Linux, libstdc++ depends on the NSS system which dynamically loads libraries to implement things like getpwent(). Last time I had to actually make a portable static executable (admittedly some years ago) this was a real problem, and it was easier to statically link everything except libstdc++, then ship a copy which was loaded using RPATH in the linker settings.