更新时间:2023-02-16 15:16:44
使用vcpkg怎么样,这是一种编译库/驱动程序的简便方法.
How about using the vcpkg it is an easy way of compiling libraries/driver.
按照git上的说明下载vcpkg. https://github.com/Microsoft/vcpkg
Download vcpkg follow the instructions as mentioned on git. https://github.com/Microsoft/vcpkg
步骤1 C:\ vcpkg>.\ vcpkg搜索mongodb
您会看到类似的东西
mongo-c-driver 1.6.2-1用C语言编写的MongoDB客户端库.
mongo-c-driver 1.6.2-1 Client library written in C for MongoDB.
mongo-cxx驱动程序3.1.1-1 MongoDB C ++驱动程序.
mongo-cxx-driver 3.1.1-1 MongoDB C++ Driver.
步骤2 C:.\ vcpkg搜索mongodb安装mongo-cxx-driver
然后抢一杯咖啡....
then grab cup of coffee ....
第3步
C:\ vcpkg>.\ vcpkg集成安装
完成..
注意前提条件:
Windows 10、8.1或7
Windows 10, 8.1, or 7
Visual Studio 2017或Visual Studio 2015 Update 3
Visual Studio 2017 or Visual Studio 2015 Update 3
然后只需创建一个项目,然后在项目中添加所需的包含.
then simply create a project and add the required include in the project .
由@JoyoWaseem回答
Answered by @JoyoWaseem