[普通]libbson windows编译文档

作者(passion) 阅读(1191次) 评论(0) 分类( 软件)

Build

on Windows requires Windows Vista or newer and Visual Studio 2010 or newer. Additionally, cmake is required to generate Visual Studio project files.

Let’s start by generating Visual Studio project files for libbson. The following assumes we are compiling for 64-bit Windows using Visual Studio 2010 Express which can be freely downloaded from Microsoft.

> cd libbson-1.8.2
> cmake -G "Visual Studio 14 2015 Win64" \
  "-DCMAKE_INSTALL_PREFIX=C:\libbson"
> msbuild.exe ALL_BUILD.vcxproj
> msbuild.exe INSTALL.vcxproj

You should now see libbson installed in C:\libbson. By default, this will create a debug build of libbson. To enable release build additional argument needs to be provided to both cmake and msbuild.exe:

> cd libbson-1.8.2
> cmake -G "Visual Studio 14 2015 Win64" \
  "-DCMAKE_INSTALL_PREFIX=C:\libbson" \
  "-DCMAKE_BUILD_TYPE=Release"
> msbuild.exe /p:Configuration=Release ALL_BUILD.vcxproj
> msbuild.exe /p:Configuration=Release INSTALL.vcxproj

You can disable building the tests with:

> cmake -G "Visual Studio 14 2015 Win64" \
  "-DCMAKE_INSTALL_PREFIX=C:\libbson" \
  "-DENABLE_TESTS:BOOL=OFF"


« 上一篇:wifi共享上网(至尊版wifi)
« 下一篇:mongocxx driver编译安装
在这里写下您精彩的评论
  • 微信

  • QQ

  • 支付宝

返回首页
返回首页 img
返回顶部~
返回顶部 img