I have a code:
struct hostent *hp = gethostbyname(dns.c_str());
in my app. I compile it on Ubuntu server linking all statically. All ok, but when i try to start this app on CentOS i have a error in this gethostbyname calling:
Floating point exception
Can you help me how to fix that? Thanks!
static linking considered harmful http://www.akkadia.org/drepper/no_static_linking.html
"all kinds of features in the libc (locale (through iconv), NSS, IDN, ...) require dynamic linking to load the appropriate external code."