yangyangwithgnu / hardseed

SEX IS ZERO (0), so, who wanna be the ONE (1), aha?
GNU General Public License v2.0
9.26k stars 1.83k forks source link

编译报错 undefined reference to `libiconv_open' #54

Closed silentred closed 4 years ago

silentred commented 8 years ago
Linking CXX executable hardseed
CMakeFiles/hardseed.dir/root/hardseed/src/lib/helper/Webpage.o: In function `Webpage::convertCharset(std::string const&, std::string const&)':
Webpage.cpp:(.text+0x240c): undefined reference to `libiconv_open'
Webpage.cpp:(.text+0x2481): undefined reference to `libiconv_close'
Webpage.cpp:(.text+0x267c): undefined reference to `libiconv'
collect2: error: ld returned 1 exit status
make[2]: *** [hardseed] Error 1
make[1]: *** [CMakeFiles/hardseed.dir/all] Error 2
make: *** [all] Error 2

已经安装最新 libiconv-1.14, Linux 6.4

AngusLkc commented 6 years ago

TARGET_LINK_LIBRARIES(hardseed curl pthread) 改成: TARGET_LINK_LIBRARIES(hardseed curl pthread iconv)