1

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

dzada
  • 5,344
  • 5
  • 29
  • 37
  • Running `cmake . -DBoost_DEBUG=ON` should output a pile of debug info about how CMake is trying to find boost. If that doesn't make the answer clear, can you add that output to your question along with an example of the path and name of one of the built boost libs? – Fraser Dec 12 '13 at 05:03

1 Answers1

1

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.

kenba
  • 4,303
  • 1
  • 23
  • 40
  • Is it to say that I can't use boost libs dependency without installing it? currently I have boost libs checkouted and built in deps/boost – dzada Dec 13 '13 at 06:36
  • BOOST_ROOT is an environment variable not a macro. You need to set it to the absolute path of `deps/boost` before you call `cmake`. Setting it as a macro, as in your call to `cmake`, won't work. – kenba Dec 13 '13 at 07:38
  • Thank you, however, I don't want to install boost. Is it a problem? – dzada Dec 13 '13 at 09:47
  • In short yes! However, you said earlier that you've already checked out and built `boost`, so you have installed it. Just let `cpp-netlib` know where by setting the `BOOST_ROOT` environment variable. – kenba Dec 13 '13 at 11:09
  • I just built it in place where I downloaded it, as I wrote in my question. but if I indicate this path even absolute it does not find it – dzada Dec 13 '13 at 14:56
  • Perhaps your answer lies here: [cmake doesn't find boost](http://stackoverflow.com/questions/13223707/cmake-doesnt-find-boost?rq=1) – kenba Dec 14 '13 at 08:16