Getting the Example Code

toc next >>

The Example Code

If you looking at this document on the web you can get the examples from the Shared Memory Arena source distribution at SourceForge Downloads. Download the latest, shm_arena-x.x.x.tar.bz2, tar file and un-tar it, thus creating a source directory. The examples will be in doc/examples/ in the untared source directory.

Install Shared Memory Arena

There may be many ways to install it and the examples code with your OS distribution package manager. You can get the source to Shared Memory Arena and build and install it. It uses the standard GNU Autotools (./configure && make && make install) to build and install from the source.

Compile the Example Code

Compile the code for this tutorial by running make (GNU make) in the examples/tutorial/ directory:

make

This should build many example programs.

You may need to set the environment variable PKG_CONFIG_PATH to the directory where the pkg-config file shm_arena.pc is installed. Like /usr/local/lib/pkgconfig or wherever you installed it.

bash shell
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/OR_WHEREVER

tcsh or csh
setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig/OR_WHEREVER

toc next >>


Shared Memory Arena version RC-0.0.25