c - Create statically-linked binary that uses getaddrinfo? -
i have included header netdb.h, getaddrinfo included, gcc issues warning:
warning: using 'getaddrinfo' in statically linked applications requires @ runtime shared libraries glibc version used linking gcc -m32 -static -s -o2 -std=c99 -d_posix_c_source=200112l myprogram.c
how can statically compile whatever file missing ?
possible solutions:
it glibc installation missing corresponding object file necessary static compilation. if case, create corresponding object file , link @ compilation.
try eglibc instead of glibc.
i succesfully compiled program dietlibc compiled without errors plus resulting binary smaller glibc makes.
glibc uses libnss support number of different providers address resolution services. unfortunately, cannot statically link libnss, providers loads depends on local system's configuration.
Comments
Post a Comment