编译ACE提示undefined reference to `in_word_set(char const *, unsigned int)’
使用linux编译ACE库,按照官网的步骤创建config.h文件和platform_macros.GNU文件后,使用make命令编译,结果提示以下错误:
[php]
/usr/local/ACE_wrappers/apps/gperf/tests/test.cpp:28: undefined reference to
`in_word_set(char const *, unsigned int)’
collect2: ld returned 1 exit status
make[4]: *** [cppout] Error 1
make[4]: Leaving directory `/usr/local/ACE_wrappers/apps/gperf/tests’
[/php]
其实是因为步骤少了一步,设置LD_LIBRARY_PATH的环境变量值,使用以下命令,重新编译即可:
[php]
export LD_LIBRARY_PATH=$ACE_ROOT/lib
[/php]