Build process for Ubuntu Linux 9.04 and later

Build process for Ubuntu Linux 9.04 and later

Installation steps

Step 1: Download the current development branch via Mercurial

hg clone http://cellml-api.hg.sourceforge.net:8000/hgroot/cellml-api/cellml-api

Step 2: Install external packages

Required Linux packages

  • cmake - A tool for generating GNU Standards-compliant Makefiles
  • g++ - The GNU C++ compiler
  • libgsl0-dev - GNU Scientific Library (GSL) – development package (only required if you want to use GSL integrators).
  • omniidl4 - omniORB idl to C++ and Python compiler
  • openjdk-6-jdk - Required if you want the Java binding to the CellML DOM API

Install the packages:

sudo apt-get install <package-name>

Step 3: Build the CellML DOM API from its source code

cd cellml-api/ ccmake . # While in ccmake, select the options you want to enable. Press 'c' and then 'g'. make

Step 4: Test the CellML API

make test

Step 5: Install the CellML API

sudo make install

Step 6: Compiling and running Java code

javac -cp /<pathToCellMLJARFile>/cellml-api/cellml.jar <pathToYourJavaProgram>/<ClassName>.java

java -Djava.library.path=/usr/local/lib:/<pathToCellMLAPIFolder>/cellml-api -cp .:/<pathToCellMLJARFile>/cellml-api/cellml.jar:/usr/local/lib/ <pathToYourJavaProgram>/<ClassName>

Depending on your linker set up, you may need to add /usr/local/lib to your LD_LIBRARY_PATH environment variable: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib