今天在服务器安装coreseek的时候,编译csft的时候提示:undefined reference to `libiconv_open'、undefined reference to `libiconv'、undefined reference to `libiconv_close',接下来为大家介绍一下解决方法,有需要的小伙伴可以参考一下:

1、错误提示:

/usr/local/coreseek-4.1-beta/csft-4.1/src/sphinx.cpp:22292:undefined reference to `libiconv_open'
/usr/local/coreseek-4.1-beta/csft-4.1/src/sphinx.cpp:22310:undefined reference to `libiconv'
/usr/local/coreseek-4.1-beta/csft-4.1/src/sphinx.cpp:22316:undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make[2]: *** [indexer] Error 1
make[2]: Leaving directory“/usr/local/coreseek-4.1-beta/csft-4.1/src”
make[1]: *** [all] Error 2
make[1]: Leaving directory“/usr/local/coreseek-4.1-beta/csft-4.1/src”
make: *** [all-recursive] Error 1

2、解决方法:

    编辑Makefile文件:

vim /usr/local/coreseek-4.1-beta/csft-4.1/src/Makefile

    在修改249行LIBS = -ldl -lm -lz -lexpat -L/usr/local/lib -lrt  -lpthread ,修改为如下:

LIBS = -ldl -lm -lz -lexpat -liconv -L/usr/local/lib -lrt  -lpthread

    保存,重新编译即可

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章