home | download | documentation | examples | sourceforge | forums

## Install

### GCC on UNIX platforms (and similar systems)

Unpack the libharu package.
tar -xvzf libharu_X.X.X.tgz
cd libharu-X.X.X

Run configure script. (If the configure script does not work well, use custom-built makefiles in the "script" directory.)

./configure [--prefix=$HOME] [--shared] [--cflags=ADDITIONAL_CFLAGS]
NOTE:
When you build haru for creating ruby extension library on linux platforms, run configure script with following command.
./configure --cflags=-fPIC

Build library and install.

make clean
make
make install

Type "make demo" to test library. If it succeeds, some PDF files are made in the demo directory.

make demo

### Windows platforms (except cygwin/MinGW)

Unpack the libharu package on command prompt.
unzip -xvzf libharu_X.X.X_win32.zip
cd libharu-X.X.X

There are several kinds of Makefile for every compilers in script directory.
Build library with an appropriate Makefile.

1) Microsoft VC++ Compiler

nmake -f script/Makefile.msvc

2) Bor land C++

make -f script/Makefile.bcc
Note:
If you want to create DLL, use Makefile.msvc_dll (or Makafile.bcc32_dll) instead.

Type following commands to test library. If it succeeds, some PDF files are made in the demo directory.
In Windows environment, Install command is not prepared.

1) Microsoft VC++ Compiler

nmake -f script/Makefile.msvc[_dll] demo

2) Bor land C++

make -f script/Makefile.bcc[_dll] demo
If you use "Visual Studio .NET", use "Visual Studio .NET Command Prompt" to build Haru. But some warnings about optimizing may occur because of the compiler included in "Visual Studio .NET" does not have an optimizing feature.
We can also use "Microsoft Visual C++ Toolkit 2003" and "Microsoft Platform SDK" instead. The compiler of "Microsoft Visual C++ Toolkit 2003" supports optimizing feature.

### Cygwin/MinGW

Unpack the libharu package.
tar -xvzf libharu_X.X.X.tgz
cd libharu-X.X.X

Run configure script. If you want to make libharu using MinGW on cygwin, add "--nocygwin" as argument.
"--nocygwin" options is not required in MinGW on MSYS.

./configure [--prefix=$HOME] [--shared] [--nocygwin]

Build library and install. The default install path is /usr/local/include and /usr/local/lib.

make install

Type "make demo" to test library. If it succeeds, some PDF files are made in the demo directory.

make demo

### Other Platforms

There are several custom make files in script directory. I think that you can build library by adding some changes to these files.
If you succeed at making Haru on other platforms, please send me your make-files.