Skip to content

Conversation

@ljch2018
Copy link
Contributor

Fix undefined reference to `libiconv_open' problem in some old system.

Fix undefined reference to `libiconv_open' problem in some old system.
@wshhja
Copy link

wshhja commented Apr 3, 2019

Excuse me,i modified the file CMakeList.txt as your commit,but it still report error "undefined reference to libiconv_open".How can i fixed the bug?My console log shows that:
Linking CXX executable annoy_index_build_tool libanyq.a(utils.cpp.o):在函数‘anyq::utf8_to_gbk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)’中: /home/hhj/gd/AnyQ/src/common/utils.cpp:448:对‘libiconv_open’未定义的引用 /home/hhj/gd/AnyQ/src/common/utils.cpp:449:对‘libiconv’未定义的引用 /home/hhj/gd/AnyQ/src/common/utils.cpp:450:对‘libiconv_close’未定义的引用 libanyq.a(utils.cpp.o):在函数‘anyq::gbk_to_utf8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)’中: /home/hhj/gd/AnyQ/src/common/utils.cpp:464:对‘libiconv_open’未定义的引用 /home/hhj/gd/AnyQ/src/common/utils.cpp:465:对‘libiconv’未定义的引用 /home/hhj/gd/AnyQ/src/common/utils.cpp:466:对‘libiconv_close’未定义的引用 collect2: error: ld returned 1 exit status CMakeFiles/annoy_index_build_tool.dir/build.make:108: recipe for target 'annoy_index_build_tool' failed make[2]: *** [annoy_index_build_tool] Error 1 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/annoy_index_build_tool.dir/all' failed make[1]: *** [CMakeFiles/annoy_index_build_tool.dir/all] Error 2 Makefile:75: recipe for target 'all' failed make: *** [all] Error 2

@wshhja
Copy link

wshhja commented Apr 4, 2019

参考https://blog.csdn.net/plgkm6/article/details/80258744的办法已解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants