Skip to content

QpoasesInstallation

Stefan Vigerske edited this page Feb 23, 2020 · 1 revision

qpOASES is self-contained! Except for a couple of standard C libraries, no further external software packages are required. Optionally, the LAPACK and BLAS libraries can be linked for performing internal linear algebra operations.

qpOASES has been successfully installed on PCs running Linux, Windows or Mac OS X, and can also run on embedded computing hardware. This page provides a concise instructions on how to install qpOASES. We refer to the Chapter 2 and 6 of the User's Manual for all details.

== Standard Installation under Linux ==

  1. _Obtain the latest stable release_ of qpOASES as described on the Download page. \ \

  2. If you obtained a zipped archive, _unpack the archive_:

gunzip qpOASES-3.2.1.tgz\ tar xf qpOASES-3.2.1.tar

A new directory qpOASES-3.2.1 will be created. From now on we refer to (the full path of) this directory or the one you used to check out the latest stable branch by <install-dir>. It contains seven subfolders, namely

bin (to contain compiled executables and libraries),\ doc (manual and a doxygen configuration file),\ examples (source code of example files for setting up your own QP problems),\ include (qpOASES header files),\ interfaces (interfaces to third-party software),\ src (qpOASES source files),\ testing (basic unit testing), \ \

  1. qpOASES is distributed under the terms of the GNU Lesser General Public License v2.1, which you can find in the file <install-dir>/LICENSE.txt or here. \ Please _read this licence file_ _carefully before you proceed with the installation, as you implicitly agree with this licence by using qpOASES! _ \ \

  2. If you want to use qpOASES via the provided third-party interfaces only, you can skip the following steps and proceed as described in Chapter 6 of the User's Manual. \ Otherwise continue with the _compilation of the qpOASES library libqpOASES.a (or libqpOASES.so) and test examples_:

cd <install-dir>\ make

This library libqpOASES.a provides the complete functionality of the qpOASES software package. It can be used by, e.g., linking it against a main function from the examples folder. The make also compiles a couple of test examples; executables are stored within the directory <install-dir>/bin. \ \

  1. _Running a simple test example_:

Among others, an executable called example1 should have been created; run it in order to test your installation:

cd <install-dir>/bin\ ./example1

If it terminates after successfully solving two QP problems, qpOASES has been successfully installed! \ \

  1. Optional, _create source code documentation_:

cd <install-dir>/doc\ doxygen doxygen.config

Afterwards, you can open the file <install-dir>/doc/html/index.html with your favorite browser in order to view qpOASES's source code documentation.

== Installation on Windows or Mac OS X ==

It is also possible to natively install qpOASES on a Windows or Mac OS X machine as it does not require any Linux-specific commands. Installation on different operating systems is facilitated by the following means:

  1. _Customised Makefiles_:

    When calling make, the file <install-dir>/make.mk is used to select compiler settings that are tailored to different operating systems. The following settings are provided:

    make_linux.mk, the default choice, for compiling under Linux,\ make_cygwin.mk for compiling under Windows using Cygwin,\ make_windows.mk for compiling under Windows using Microsoft Visual Studio,\ make_osx.mk for compiling under Mac OS X.

    Uncomment your preferred choice and run make.

  2. _Compiling with CMake_:

    The file <install-dir>/CMakeLists.txt configures compilation on Linux or Windows by means of CMake. We refer to the CMake documentation for further details.

Static vs. Dynamic Library

qpOASES can be compiled into either a static or a dynamic library to be linked against the executable at runtime. Both variants are configured in the respective Makefiles.


See also Introduction, Download, User Support, Authors and Contributors