Introduction

The most practical way to use CharLS is to use the source distribution and build it yourself. This ensures that the library matches your C++ compiler and environment.

Linux and other platforms

Required Tools

Git
CharLS is maintained in a Git repository. Git is supported on almost all platforms. Git clients can be downloaded from http://git-scm.com

CMake
CharLS ships with a CMakeLists.txt file that can be used with CMake. Many Linux distributions have CMake by default installed. CMake can also be downloaded from http://www.cmake.org/

C++ Compiler
To build CharLS 2.0 a C++ 11 compatible compiler is required (CharLS 1.x can be build with C++ 03). If a C++ compiler is installed CMake is capable to find it.

Build Steps

Steps
  1. Clone the Git repository from CodePlex to your own system.
  2. CMake can be used to build in-source and out-of-source. The recommendation is to build CharLS out-of-source:
  3. To build the “debug” version, use:
    1. cd into the root directory of your charls git repository
    2. mkdir debug
    3. cd debug
    4. cmake -DCMAKE_BUILD_TYPE=Debug ..
    5. make
  4. To build the “release” version, use:
    1. cd into the root directory of your charls git repository
    2. mkdir release
    3. cd release
    4. cmake -DCMAKE_BUILD_TYPE=Release ..
    5. make

Windows

Required tools

Git
CharLS is maintained in a Git repository. Git is supported on almost all platforms. Git clients can be downloaded from http://git-scm.com. The latest Visual Studio version have Git support build in.

C++ Compiler
Visual Studio 2013, 2012 or 2010. Visual Studio Community 2013 is a free version that can be downloaded from Microsoft.

Code Contracts for .NET
Code Contracts for .NET (if you want to build the .NET interface project) can be downloaded from visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970

NUnit
NUnit (if you want to build the .NET unittest project for the .NET interface project) can be downloaded from http://www.nunit.org/

CharLS ships with a specific solution file for every Visual Studio version. By default the solution file targets the C++ compiler and the .NET version that ships with that specific Visual Studio versions. Loading the solution and batch building it will build all versions (32 bit, 64 bit, Debug, Release and Checked). Checked is a special version that has static analysis enabled. Not all Visual Studio versions ships however with these static analysis tools.





Last edited Nov 15, 2014 at 6:22 PM by vbaderks, version 3

Comments

No comments yet.