私はコードをもっている:
struct hostent *hp = gethostbyname(dns.c_str());
私のアプリで。すべてを静的にリンクするUbuntuサーバーでコンパイルします。すべて問題ありませんが、CentOS でこのアプリを起動しようとすると、この gethostbyname 呼び出しでエラーが発生します。
浮動小数点例外
それを修正する方法を教えてもらえますか?ありがとう!
私はコードをもっている:
struct hostent *hp = gethostbyname(dns.c_str());
私のアプリで。すべてを静的にリンクするUbuntuサーバーでコンパイルします。すべて問題ありませんが、CentOS でこのアプリを起動しようとすると、この gethostbyname 呼び出しでエラーが発生します。
浮動小数点例外
それを修正する方法を教えてもらえますか?ありがとう!
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."