Skip to content

Commit

Permalink
Doc: Mention SWIG
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Oct 25, 2024
1 parent 487b87f commit 29211f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/docs/NLopt_Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# NLopt Installation
---

The installation of NLopt is fairly standard and straightforward, at least on Unix-like systems (GNU/Linux is fine). It doesn't require any particular packages to be installed except for a C compiler, although you need to have [Octave](https://en.wikipedia.org/wiki/GNU_Octave) and/or Matlab installed if you want to install the Octave and/or Matlab plugins, respectively.
The installation of NLopt is fairly standard and straightforward, at least on Unix-like systems (GNU/Linux is fine). It doesn't require any particular packages to be installed except for a C compiler, although you need to have [Octave](https://en.wikipedia.org/wiki/GNU_Octave), Matlab, [Guile](https://www.gnu.org/software/guile/) or [Python](https://www.python.org/) installed if you want to install the corresponding plugins.

In particular, NLopt uses the standard [CMake](https://cmake.org/) `cmake` build system, which means that you compile it via:

Expand Down Expand Up @@ -118,7 +118,7 @@ cmake -DINSTALL_OCT_DIR=octdir -DINSTALL_M_DIR=mdir ..
Python plugins
--------------

If [Python](https://en.wikipedia.org/wiki/Python_(programming_language)) is installed on your machine, and you configured NLopt as a shared library (see above), then NLopt will automatically compile and install a Python `nlopt` module. You also need [NumPy](https://en.wikipedia.org/wiki/NumPy) to be installed, as NLopt's Python interface uses NumPy array types.
If [Python](https://en.wikipedia.org/wiki/Python_(programming_language)) and [SWIG](https://www.swig.org/) are installed on your machine, then NLopt will automatically compile and install a Python `nlopt` module. You also need [NumPy](https://en.wikipedia.org/wiki/NumPy) to be installed, as NLopt's Python interface uses NumPy array types.

To specify a particular version or location of Python, use the `Python_EXECUTABLE` variable to set the full path to the `python` executable:

Expand All @@ -129,7 +129,7 @@ cmake -DPython_EXECUTABLE=/usr/bin/python ..
GNU Guile plugins
-----------------

If [Guile](https://en.wikipedia.org/wiki/GNU_Guile) is installed on your machine, and you configured NLopt as a shared library (see above), then a Guile `nlopt` module will automatically be compiled and installed.
If [Guile](https://en.wikipedia.org/wiki/GNU_Guile) and [SWIG](https://www.swig.org/) are installed on your machine, then a Guile `nlopt` module will automatically be compiled and installed.

Note that many GNU/Linux distributions come with only the Guile program and shared libraries pre-installed; to compile the NLopt plugin you will also need the Guile programming header files, which are usually in a `guile-dev` or `guile-devel` package that you must install separately.

Expand Down

0 comments on commit 29211f4

Please sign in to comment.