[back to Index]

LibRaw Compilation and Installation

LibRaw is distributed in the form of source codes. For further use, they should be compiled (and, if desired, placed into system folders with libraries and include-files).

Unix Systems (FreeBSD, Linux, Mac OS X)

To build the library, you will need a working C++ compiler (gcc ver. 3.x or 4.x will be OK; other compilers have not been tested) and the make utility. No other libraries or utilities are required.

LibRaw has been tested on 32- and 64-bit Unix systems working on x86- (and AMD64-) compatible processors. Building and work on other architectures have not been tested.

Compilation of Library and Examples

Unpack the downloaded distribution package, go to the resultant folder and run make:

        tar xzvf LibRaw-X.YY.tar.gz
        cd  LibRaw-X.YY
        make
    

As a result, you will compile

In the current version, only static libraries are built:

Compilation with LCMS (ICC profiles) support

For LCMS support one should uncomment two lines of Makefile after the line

# LCMS support
It is assumed, that LCMS library is installed in /usr/local/lib or /usr/lib, and lcms.h installed in /usr/local/include or /usr/include. If you have different LCMS installation path, you should edit Makefile settings.

OpenMP Support

For compilation with OpenMP support uncomennt line of Makefile next after the line

# OpenMP support

Installation and Usage

To install the library, run

    make install
    

It will place the libraries in /usr/local/lib and the include-files in /usr/local/include (subfolder of libraw).
To use LibRaw, add the following parameters to the compiler call (when building your own projects):

Installation of Examples

To install examples, run make install-binaries. This command will copy all compiled examples to /usr/local/bin.

Windows: Building under Cygwin

Building and installation are completely similar to building and installation under Unix systems.

Windows: Native Building

Building under Windows has three steps:

If all paths are set correctly and the include-files/libraries have been found, then the following will be compiled:

Only the thread-safe library is built under Win32, but it can be used with non-threaded applications as well. All examples are linked with the dynamic library (DLL); if static linking is necessary, one should link applications with library libraw_static.lib and set the preprocessor option /DLIBRAW_NODLL during compilation.

Windows-version compiles without LCMS support for now.

During building of DLL, all public functions are exported; further, the exported subset may be reduced.

Unfortunately, paths to include/ libraries depend on the way Visual C (or other compiler) is installed; therefore, it is impossible to specify some standard paths in Makefile.msvc.

Windows Installation

No installation under Windows is supported. It is assumed that all DLLs will be supplied together with the software using them (and this software will perform the installation). Accordingly, in building of programs using LibRaw, the paths to libraries, DLLs, and include-files should be specified manually.

[back to Index]
LibRaw Team
Last modified: Sun Mar 28 22:08:21 MSD 2010