[Seek Help] 求c++开发连接 mongo5.0
Tofloor
poster avatar
151******18
deepin
2023-04-18 01:01
Author

进行c++ 开发连接mongo 5.0,需要libmongoc,从最新源码构建libmongoc报错,求教解决办法,或者其他能让c++ 开发连接mongo 5.0的办法,用的是deepin社区(20.8),求助!

/usr/bin/ld: libmongoc-1.0.so.0.0.0: undefined reference to `usprep_close_70'
/usr/bin/ld: libmongoc-1.0.so.0.0.0: undefined reference to `u_strToUTF8_70'
/usr/bin/ld: libmongoc-1.0.so.0.0.0: undefined reference to `usprep_openByType_70'
/usr/bin/ld: libmongoc-1.0.so.0.0.0: undefined reference to `usprep_prepare_70'
/usr/bin/ld: libmongoc-1.0.so.0.0.0: undefined reference to `u_strFromUTF8_70'
collect2: error: ld returned 1 exit status
make[2]: *** [src/libmongoc/CMakeFiles/mongoc-stat.dir/build.make:105:src/libmongoc/mongoc-stat] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1738:src/libmongoc/CMakeFiles/mongoc-stat.dir/all] 错误 2
make: *** [Makefile:166:all] 错误 2
Reply Favorite View the author
All Replies
root
deepin
2023-04-18 01:15
#1

告诉编译器把 icu 库也 link 上

tail

Reply View the author
绍贝格尔
deepin
2023-04-18 02:11
#2

https://blog.csdn.net/mijichui2153/article/details/108963549

Reply View the author
151******18
deepin
2023-04-18 17:06
#3

谢谢!

Reply View the author
151******18
deepin
2023-04-20 23:27
#4

icu安装,参考分享

https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-src.tgz

https://noknow.info/it/os/install_icu4c_from_source?lang=en

Reply View the author
151******18
deepin
2023-04-21 06:06
#5

icu 73.1安装了,还是同样的提示,头疼... /usr/bin/ld: libmongoc-1.0.so.0.0.0: undefined reference to `usprep_close_70'

Reply View the author
151******18
deepin
2023-04-21 23:05
#6

解决,直接添加 https://github.com/julp/FindICU.cmake 搞定,具体原因没搞清😰

Reply View the author