作者:佚名 时间:2024-02-22 12:18:28 阅读:(18)
在服务器安装coreseek编译csft的时候提示:undefined reference to `libiconv_open'、undefined reference to `libiconv'、undefined reference to `libiconv_close',接下来云梦编程为大家介绍一下解决方法,有需要的小伙伴可以参考一下:
/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
编辑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
保存,重新编译即可