undefined reference to `libiconv(已解决)

安装sphinx时又报错,真是疯了啊。

在make时报错,错误内容:
r/local/src/sphinx/sphinx-0.9.8-rc2/src/tokenizer_zhcn.cpp:280: undefined reference to `libiconv'
libsphinx.a(tokenizer_zhcn.o)(.text+0x6fd):/usr/local/src/sphinx/sphinx-0.9.8-rc2/src/tokenizer_zhcn.cpp:55: undefined reference to

`libiconv_open'
libsphinx.a(tokenizer_zhcn.o)(.text+0x719):/usr/local/src/sphinx/sphinx-0.9.8-rc2/src/tokenizer_zhcn.cpp:58: undefined reference to

`libiconv'
libsphinx.a(tokenizer_zhcn.o)(.text+0x7a4): In function `CSphTokenizer_zh_CN_UTF8::~CSphTokenizer_zh_CN_UTF8()':
/usr/local/src/sphinx/sphinx-0.9.8-rc2/src/tokenizer_zhcn.cpp:34: undefined reference to `libiconv_close'
libsphinx.a(tokenizer_zhcn.o)(.text+0xd04): In function `CSphTokenizer_zh_CN_UTF8::~CSphTokenizer_zh_CN_UTF8()':
/usr/local/src/sphinx/sphinx-0.9.8-rc2/src/tokenizer_zhcn.cpp:34: undefined reference to `libiconv_close'
libsphinx.a(tokenizer_zhcn.o)(.text+0x125c): In function `CSphTokenizer_zh_CN_UTF8::~CSphTokenizer_zh_CN_UTF8()':
/usr/local/src/sphinx/sphinx-0.9.8-rc2/src/tokenizer_zhcn.cpp:34: undefined reference to `libiconv_close'

解决
一开始以为libiconv的问题,又重装了几次还是一样,最后终于找着办法了
编辑:
./src/MakeFile文件

LIBS = -lm -lexpat -L/usr/local/lib
改成
LIBS = -lm -lexpat -liconv -L/usr/local/lib

ok了

你可能感兴趣的:(reference,function,c)