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
0b597bbe
Commit
0b597bbe
authored
Aug 30, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated docs
parent
7d27baf4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
35 deletions
+38
-35
compile.xml
docs/docs/compile.xml
+38
-35
No files found.
docs/docs/compile.xml
View file @
0b597bbe
...
...
@@ -2,17 +2,44 @@
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>
How to compile
</title>
<!-- ************************************************************************* -->
<body>
<center><h1>
Using dlib from Python
</h1></center>
<p>
Go to the base folder of the dlib repository and run
<tt>
python setup.py install
</tt>
.
Once that command finishes running
you are ready to use dlib from Python. Note that you need to
have CMake and a working C++ compiler installed for this to
work.
</p>
<p>
Also note that various optional features like GUI support (e.g.
dlib.image_window) and CUDA acceleration will be either enabled or
disabled based on what is available on your computer. When you run
the install command it will print messages telling you what it is
using. Read those messages and take appropriate action if you
don't like the results. For example, Linux and OSX users may have
to install libX11 to use the GUI tools. If you care about this
then read the messages since they tell you how to get these
optional features installed.
</p>
<p>
Alternatively, if you want to add more python bindings to dlib's
python interface then you probably want to avoid the setup.py file
and work directly using CMake. In particular, dlib's python API is
built by the CMake project in the tools/python folder. You build
this project using the usual CMake commands and when compiled it
outputs the dlib shared library that defines the python API for dlib.
</p>
<!-- ************************************************************************* -->
<body>
<br/>
<hr/>
<br/>
<center><h1>
Using dlib from C++
</h1></center>
<h2>
Compiling C++ Example Programs on Any Operating System Using CMake
</h2>
The best way to compile a program that uses dlib is to use
<a
href=
"http://www.cmake.org"
>
CMake
</a>
. For
example, the following commands will compile the example programs on any operating
system:
...
...
@@ -45,31 +72,6 @@ tell CMake which one you want it to use via the -G option.
</p>
<br/>
<h2>
Compiling Dlib's Python Interface
</h2>
<p>
Go to the base folder of the dlib repository and run
<tt>
python setup.py install
</tt>
. That
should compile and install the dlib python API on your system. Note that you need to have CMake
and a working C++ compiler installed for this to work.
</p>
<p>
Also note that various optional features like GUI support (e.g.
dlib.image_window) and CUDA acceleration will be either enabled or
disabled based on what is available on your computer. When you run
the install process it will print messages telling you what it is
using. Read those messages and take appropriate action if you
don't like the results. For example, Linux and OSX users may have
to install libX11 to use the GUI tools. If you care about this
then read the messages since they tell you how to get these
optional features installed.
</p>
<p>
Alternatively, if you want to add more python bindings to dlib's
python interface then you probably want to avoid the setup.py file
and work directly using CMake. In particular, dlib's python API is
built by the CMake project in the tools/python folder. You build
this project using the usual CMake commands and when compiled it
outputs the dlib shared library that defines the python API for dlib.
</p>
<br/>
...
...
@@ -151,12 +153,13 @@ sudo apt-get install libx11-dev
<p>
Dlib's cmake scripts contain the standard install target. So you
can use CMake to install dlib system wide as a precompiled static or
shared library just like you would with any other C++ library.
However, most users should use CMake as described at the top of this page since that's
the simplest method. In particular, it allows you to turn dlib's
debugging modes on and off whenever you want, which is something you
really should use since dlib's debugging modes are one of its
strongest features.
shared library just like you would any other C++ library.
However, most users should use CMake as described at the top of this
page (specifically as shown in the
<a
href=
"examples/CMakeLists.txt.html"
>
examples project
</a>
) since
that's the simplest method. In particular, it allows you to turn
dlib's debugging modes on and off whenever you want, which is
something you really should use since dlib's debugging modes are one
of its strongest features.
</p>
<p>
...
...
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