AnyQ icon indicating copy to clipboard operation
AnyQ copied to clipboard

Update CMakeLists.txt

Open ljch2018 opened this issue 7 years ago • 2 comments

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

ljch2018 avatar Feb 27 '19 07:02 ljch2018

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 avatar Apr 03 '19 09:04 wshhja

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

wshhja avatar Apr 04 '19 07:04 wshhja