C++ CMake:找不到Libicu
使用CMake编译我的项目时,我得到:C++ CMake:找不到Libicu,c++,qt,ubuntu-16.04,icu,C++,Qt,Ubuntu 16.04,Icu,使用CMake编译我的项目时,我得到: <myPproject(file.c.o)>: In function `icuLikeCompare': <myPproject(file.c.o)>: undefined reference to `u_foldCase_55' <myPproject(file.c.o)>: undefined reference to `u_foldCase_55' <myPproject(file.c.o)>: In
<myPproject(file.c.o)>: In function `icuLikeCompare':
<myPproject(file.c.o)>: undefined reference to `u_foldCase_55'
<myPproject(file.c.o)>: undefined reference to `u_foldCase_55'
<myPproject(file.c.o)>: In function `icuCollationColl':
<myPproject(file.c.o): undefined reference to `ucol_strcoll_55'
...
如何修复此问题?在您的cmake中,您是否使用link_target_库(project${PATH_to_QT_libraries})将库链接到项目?是的,它们在您的cmake中是这样链接的,您是否使用link_target_库(project${PATH_to_QT_libraries})将库链接到项目?是的,它们是这样链接的
/home/me/Qt/5.9/5.9.1/gcc_64/lib/libicuuc.so /home/me/Qt/5.9/5.9.1/gcc_64/lib/libicui18n.so