CellML API
Building from source on Ubuntu Linux
Building from source on Ubuntu Linux
Please note: The CellML API provides binary SDK packages, so you don't need to build from source to use the CellML API on Windows, Linux, or Mac OS X. See the page about Getting Started for more information.
Installation steps
Step 1: Obtain the CellML API source repository using Mercurial
git clone https://github.com/cellmlapi/cellml-api.git
Optional Step 1a: Switch to a tagged stable release
In the below example, we switch to the 1.10 branch. You don't need to do this if you want the latest version, rather than a stable release.
git checkout 1.11
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