4

I have a problem, when I try to compile DLIB, I have the following error:

  • Could not find boost
  • Imported targets are not available for Boost version

Image from CMD, when I try to compile DLIB

image

I have this programs versions:

  • Cmake 3.5.1
  • Boost 1.6
  • Python 2.7.9 32 bits
  • My computer works on Windows 64 bits

Boost are install on C:\Program Files\boost , Help me please!

William Miller
  • 9,839
  • 3
  • 25
  • 46
Julio Cabrera
  • 93
  • 1
  • 9

2 Answers2

4

Have you compiled boost yet? Boost has some great, easy instructions to compile it. You can find it here.

After you've compiled Boost, you need to do a couple things so that DLIB can find Boost. First, I set two environment variables, BOOST_ROOT and BOOST_LIBRARYDIR. I did this in the command window before I compiled DLIB, though you could also pass these two variables to CMAKE before running the build for DLIB.

For you, on how you described your install, the commands would look something like:

set BOOST_ROOT=c:\Program Files\boost
set BOOST_LIBRARYDIR=c:\Program Files\boost\stage\lib

Make sure you've built boost (and that second folder exists). I'm not sure if this is necessary, but you could add those two to your path just to make sure.

set PATH=%PATH%;%BOOST_ROOT%;%BOOST_LIBRARYDIR%

Then you should be able to build! Good luck!

William Miller
  • 9,839
  • 3
  • 25
  • 46
Kyle
  • 98
  • 6
0

I compiled boost, python 2.7, had everything configured right and in64 bit and still was unsuccessful compiling dlib, had conflicts with 32, 64 bits.

Eventually I just used pip install with the whl from: https://pypi.python.org/pypi/dlib/18.17.100 And it worked

PeterN
  • 321
  • 2
  • 10