Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMakeLists.txt #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update CMakeLists.txt #117

wants to merge 1 commit into from

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.

None yet

2 participants