SWIG Installation Guide#

Caution: This is not an official document/tutorial of SWIG. We provide this document to help users install SWIG 3.0 as a dependency of OpenBox (a generalized blackbox optimization toolkit).


This tutorial helps you install SWIG 3.0.

Linux#

apt-get install swig3.0
ln -s /usr/bin/swig3.0 /usr/bin/swig

MacOS#

  1. Download SWIG from SWIG Download Page. Click on All releases for older releases. Then select the ‘swig’ folder. We recommend to install version 3.0.12. Unzip the files after downloading.

  2. Download pcre from here. Download ‘pcre-8.44.tar.bz2’ and rename it as ‘pcre-8.44.tar’. Then put it into the SWIG folder.

  3. Run the following commands under the SWIG folder:

./Tools/pcre-build.sh
./autogen.sh
./configure
make
sudo make install

Windows#

  1. Download SWIG for Windows from SWIG Download Page. Clicking on All releases for older releases. Then select the ‘swigwin’ folder. We recommend to install version 3.0.12. Unzip the files after downloading.

  2. Add the SWIG folder to SYSTEM PATH.