Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
977db529
Commit
977db529
authored
Dec 14, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved error messages for people who have incorrectly installed boost in windows.
parent
d5097f72
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
add_python_module
dlib/cmake_utils/add_python_module
+17
-6
No files found.
dlib/cmake_utils/add_python_module
View file @
977db529
...
...
@@ -100,24 +100,34 @@ endif()
if (NOT Boost_FOUND)
message(STATUS " *****************************************************************************************************")
if (WIN32)
if (NOT DEFINED ENV{BOOST_ROOT} OR NOT DEFINED ENV{BOOST_LIBRARYDIR})
message(STATUS "The BOOST_ROOT and/or BOOST_LIBRARYDIR environment variables are not set. You need to set these ")
message(STATUS "variables so we know where boost is installed. So set these variables to something like this:")
message(STATUS " BOOST_ROOT=C:\\local\\boost_1_57_0 " )
message(STATUS " BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
message(STATUS "The best way to set enviornment variables in Windows is to go to the start menu's search box,")
message(STATUS "type environment, and open the Environment Variables dialog. That lets you add more variables.")
message(STATUS "Add these variables to either user or system variables, it doesn't matter.")
message(STATUS "You might have to log out and log back in before the environment changes take effect.")
else()
message(STATUS "We couldn't find the right version of boost python. If you installed boost and you are still "
"getting this error then you might have installed a version of boost that was compiled with a different "
"version of visual studio than the one you are using. So you have to make sure that the version of "
"visual studio is the same version that was used to compile the copy of boost you are using.")
message(STATUS " Set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables before running cmake. ")
message(STATUS " E.g. Something like this: ")
message(STATUS " set BOOST_ROOT=C:\\local\\boost_1_57_0 " )
message(STATUS " set BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
message(STATUS "")
message(STATUS " You will also
likely need to compile boost yourself rather than using one of the precompiled ")
message(STATUS " You will
likely need to compile boost yourself rather than using one of the precompiled ")
message(STATUS " windows binaries. Do this by going to the folder tools\\build\\ within boost and running ")
message(STATUS " bootstrap.bat. Then run the command: ")
message(STATUS " b2 install")
message(STATUS " And then add the output bin folder to your PATH. Usually this is the C:\\boost-build-engine\\bin")
message(STATUS " folder. Finally, go to the boost root and run a command like this:")
message(STATUS " b2 -a --with-python address-model=64 toolset=msvc runtime-link=static")
message(STATUS " When it completes, set BOOST_LIBRARYDIR equal to wherever b2 put the compiled libraries.")
message(STATUS " Note that you will need to set the address-model based on if you want a 32 or 64bit python library.")
message(STATUS " When it completes, set the BOOST_LIBRARYDIR environment variable equal to wherever b2 put the ")
message(STATUS " compiled libraries. You will also need to set BOOST_ROOT to the root folder of the boost install.")
message(STATUS " E.g. Something like this: ")
message(STATUS " set BOOST_ROOT=C:\\local\\boost_1_57_0 " )
message(STATUS " set BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
message(STATUS "")
message(STATUS " Next, if you aren't using python setup.py then you will be invoking cmake to compile dlib. ")
message(STATUS " In this case you may have to use cmake's -G option to set the 64 vs. 32bit mode of visual studio. ")
...
...
@@ -127,6 +137,7 @@ if (NOT Boost_FOUND)
message(STATUS " cmake ..\\..\\tools\\python")
message(STATUS " Which will build a 32bit Python2 module by default on most systems.")
message(STATUS "")
endif()
else()
message(STATUS " To compile Boost.Python yourself download boost from boost.org and then go into the boost root folder")
message(STATUS " and run these commands: ")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment