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
9c8fac91
Commit
9c8fac91
authored
Oct 12, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tried to clarify how to compile dlib with respect to visual studio and PNG and
JPEG support.
parent
bba2681b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
compile.xml
docs/docs/compile.xml
+18
-2
No files found.
docs/docs/compile.xml
View file @
9c8fac91
...
...
@@ -63,7 +63,17 @@ cmake --build . --config Release
</code_box>
Note that you also need to have a C++ compiler installed on your system. There are free C++ compilers
for most operating systems. For example, Visual Studio Express is free on Windows and GCC is free and
works well on Mac OS X and Linux systems.
works well on Mac OS X and Linux systems.
<p>
Finally, note that when using Visual Studio CMake will, by default, generate a 32bit executable.
This means the programs you compile will only be able to use 2GB of RAM. To avoid this, you need
to tell CMake to generate a 64bit executable. You do this by using a command like
<code_box>
cmake -G "Visual Studio 10 2010 Win64" ..
</code_box>
instead of
<code_box>
cmake ..
</code_box>
You can see the list of valid arguments to
<tt>
-G
</tt>
by running
<tt>
cmake
</tt>
with no options.
</p>
<h2>
Compiling on Linux From Command Line
</h2>
From within the examples folder, you can compile any of the examples with a single command like so:
...
...
@@ -98,6 +108,12 @@ sudo apt-get install libx11-dev
folder containing the dlib folder to the #include search path. Then you can compile any example program
by adding it to your project.
</p>
<p>
Note that dlib will only be able to work with JPEG and PNG files if you also add all the source
files in the dlib/external folder into your project and also add the DLIB_PNG_SUPPORT and DLIB_JPEG_SUPPORT
preprocessor directives. If you don't know how to configure Visual Studio then you should use
CMake as shown above since it will take care of everything for you.
</p>
<center><h1>
Preprocessor Directives
</h1></center>
...
...
@@ -114,7 +130,7 @@ sudo apt-get install libx11-dev
<h3>
#define ENABLE_ASSERTS
</h3>
<p>
Defining this directive causes all the
<a
href=
"metaprogramming.html#DLIB_ASSERT"
>
DLIB_ASSERT
</a>
macros to
be active. If you are using
visual s
tudio or CMake then ENABLE_ASSERTS will be automatically enabled
be active. If you are using
Visual S
tudio or CMake then ENABLE_ASSERTS will be automatically enabled
for you when you compile in debug mode. However, if you are using a different build system then you
might have to manually enable it if you want to turn the asserts on.
</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