Getting Started
This section introduces the new Shark build system. It assists the user in compiling the library from source and setting up a basic working environment. Note that this tutorial focuses on Unix-like operating systems and requires a basic knowledge of the command line.Obtaining the Library Sources
First, one needs to obtain either a release package of the Shark sources or a snapshot of the current development trunk.- Release package: http://sourceforge.net/projects/shark-project/files/
- Subversion trunk: https://shark-project.svn.sourceforge.net/svnroot/shark-project
The Build System
Starting with version 2.3.0, the Shark library relies on the CMake build system (http://www.cmake.org). CMake allows to configure the whole build process within a simple text file called CMakeLists.txt. This high-level description file is converted by CMake to IDE- and/or compiler-specific project files.
To compile the Shark library, a version of CMake >= 2.6.0 needs to installed on the build system (see http://cmake.org/cmake/resources/software.html).
Next, the usage of CMake to generate Makefiles suitable for Posix platforms is explained. For the remainder of this page, it is assumed that the Shark sources are situated in the directory ${SHARK_SRCS}
Compiling & Installing the Library
After having obtained the Shark library sources, open a terminal and change to the directory ${SHARK_SRCS}/cmake.- ${CMAKE_INSTALL_PREFIX}/
- lib: The actual library is situated here.
- include: The header files of the library.
- [Optional] share/shark/doc: The documentation of the library
- [Optional] share/shark/examples: The examples accompanying the library including binaries and source files.
> cd ${SHARK_SRCS}/cmake
> ccmake .
Compiling & Installing the Documentation
Compiling and installing the documentation is optional. Thus, the options- "OPT_COMPILE_DOCUMENTATION" and
- "OPT_INSTALL_DOCUMENTATION" respectively
> cd ${SHARK_SRCS}/cmake
> ccmake .
- doxygen: http://www.doxygen.org.
- latex: Refer to your distributions's documentation on how to install latex.
Compiling & Installing the Examples
Compiling and installing the examples is optional. Thus, the option- "OPT_COMPILE_EXAMPLES"
> cd ${SHARK_SRCS}/cmake
> ccmake .
Installing Shark on Microsoft Windows
For Windows users not familiar with CMake, we encourage using the installer of a pre-built version of the Shark library available from After having downloaded the appropriate installer, you just need to take the following steps to start developing with the Shark library:- Start the installation by double-clicking the installer.
- Select an installation directory where all necessary files will be copied to.
Further Reading
- Tobias Glasmachers' NIPS workshop talk: http://videolectures.net/mloss08_glasmachers_shark/
- Getting started with CMake:
- Qt: http://qt.nokia.com
- Qwt: http://qwt.sourceforge.net