Compile from Source

From openEMS

Jump to: navigation, search




  • Install all necessary packages and libraries: git, qt4, tinyxml, hdf5 and boost.

For example on Ubuntu 14.04 LTS or above:

sudo apt-get install build-essential git cmake libhdf5-dev libvtk5-dev libboost-all-dev libcgal-dev libtinyxml-dev libqt4-dev libvtk5-qt4-dev

Note for Ubuntu 16.04: Due to a bug in CGAL the package libcgal-qt5-dev may be required.

Optional: Additional packages for hyp2mat:

For example on Ubuntu 14.04 or above:

sudo apt-get install gengetopt help2man groff pod2pdf bison flex libhpdf-dev libtool autoconf

Optional: Install octave and octave devel packages:

sudo apt-get install octave liboctave-dev epstool transfig

Optional: Install ParaView so that gridded model can be viewed:

sudo apt-get install paraview

Build and Install

This instructions assume that you will install openEMS to ~/opt/openEMS

  • Get the openEMS source code, extract, build and install:
cd /tmp
tar jxf openEMS-v0.0.35.tar.bz2
cd openEMS
./ ~/opt/openEMS
./ ~/opt/openEMS --with-hyp2mat --with-CTB
  • Alternatively disable AppCSXCAD build (e.g. for a server-system):
./ ~/opt/openEMS --disable-GUI

Setup Matlab/Octave

Add the openEMS path to matlab (store the commands in "startup.m" or ".octaverc" in your home directory to load them on startup in matlab or octave respectively):


If you installed hyp2mat and circuit toolbox, add the paths for these optional packages as well:

addpath('~/opt/openEMS/share/hyp2mat/matlab'); % hyp2mat package
addpath('~/opt/openEMS/share/CTB/matlab'); % circuit toolbox

Build from Github

  • If you want to get the latest development version of openEMS:
git clone --recursive
cd openEMS-Project
./ ~/opt/openEMS

Mac OS-X

Experimental support using brew: brew file