This program:
// tst.cpp #include <pwd.h> // getpwuid, struct passwd int main() { getpwuid(0); return 0; }And this compile command:
g++ -static tst.cppProduces this error message:
Undefined first referenced symbol in file dlclose /usr/lib/libc.a(nss_deffinder.o) dlsym /usr/lib/libc.a(nss_deffinder.o) dlopen /usr/lib/libc.a(nss_deffinder.o) ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit statusIt's not clear (to me at least) why this happens..