How to build cpp-netlib with MSVC (cmake)

1.1k Views Asked by At

I tried to do this in MSys git bash on my win 8.1 with MSVC 12 installed, and the latest cmake and git:

$> git clone https://github.com/cpp-netlib/cpp-netlib.git
$> cd cpp-netlib
$> git submodules update --init
$> cd deps
## here I unzip the boost folder into boost
## i.e. cpp-netlib/deps/boost/ contains bjam, bootstrap and the boost include dir
$> cd boost && bootstrap.bat && ./b2.exe
$> cd ../ && mkdir build && cd build
$> cmake -G"Visual Studio 12" -DBOOST_ROOT="../deps/boost" ../

This fails: and ask me to set BOOST_ROOT.

What is wrong with this ?

Thank you for your help

1

There are 1 best solutions below

6
On

The cpp-netlib library depends upon boost and it needs to know where it's installed so that it can find it. So just set the BOOST_ROOT environment variable to the location of the boost libraries on your machine. E.g.

set BOOST_ROOT=C:\libraries\boost\boost_1_55_0

Note: you may also need to install OpenSSL if you intend to use encryption.