Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
9c8fac91
Commit
9c8fac91
authored
Oct 12, 2014
by
Davis King
Browse files
Tried to clarify how to compile dlib with respect to visual studio and PNG and
JPEG support.
parent
bba2681b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
docs/docs/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
...
@@ -63,7 +63,17 @@ cmake --build . --config Release
</code_box>
</code_box>
Note that you also need to have a C++ compiler installed on your system. There are free C++ compilers
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
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>
<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:
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
...
@@ -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
folder containing the dlib folder to the #include search path. Then you can compile any example program
by adding it to your project.
by adding it to your project.
</p>
</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>
<center><h1>
Preprocessor Directives
</h1></center>
...
@@ -114,7 +130,7 @@ sudo apt-get install libx11-dev
...
@@ -114,7 +130,7 @@ sudo apt-get install libx11-dev
<h3>
#define ENABLE_ASSERTS
</h3>
<h3>
#define ENABLE_ASSERTS
</h3>
<p>
<p>
Defining this directive causes all the
<a
href=
"metaprogramming.html#DLIB_ASSERT"
>
DLIB_ASSERT
</a>
macros to
Defining this directive causes all the
<a
href=
"metaprogramming.html#DLIB_ASSERT"
>
DLIB_ASSERT
</a>
macros to
be active. If you are using
v
isual
s
tudio or CMake then ENABLE_ASSERTS will be automatically enabled
be active. If you are using
V
isual
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
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.
might have to manually enable it if you want to turn the asserts on.
</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