NLopt on Windows
From AbInitio
| NLopt |
| Download |
| Release notes |
| FAQ |
| NLopt manual |
| Introduction |
| Installation |
| Tutorial |
| Reference |
| Algorithms |
| License and Copyright |
NLopt on Windows
NLopt works fine on Microsoft Windows computers. To simplify installation, we provide a precompiled 32-bit Windows DLL, built with MinGW (using this script):
Be sure to read the README-WINDOWS file included in this zip archive for how to build an import library for the DLL before using, by running the lib /def:libnlopt-0.def command (which comes with Microsoft compilers). If you are using GNU compilers (MinGW), run dlltool --def-input libnlopt-0.def --dllname libnlopt-0.dll --output-lib libnlopt-0.lib (dlltool comes with MinGW).
(For source code, download the main .tar.gz package.)
Alternatively, you can use the following files, provided by Benoit Scherrer (benoitscherrer ατ gmail.com), to compile NLopt from source on Windows (with the Microsoft compiler) using CMake:
Octave plugin
To build the NLopt plugin for GNU Octave (a free Matlab clone, which uses the same NLopt interface as in Matlab), you will need the following additional steps. (See Octave for Windows on the Octave web page to download Octave.)
- First, download both the
.zipfile above and the main.tar.gzpackage of NLopt. Usedlltool(which comes with Octave in the octave\mingw23\bindirectory) to create the.libimport library as explained above. - Unpack the NLopt .tar.gz file, and copy the
nlopt_optimize-oct.ccfrom the nlopt\octavedirectory, along with downloading nlopt_optimize_usage.h, and put them together with your.liband.dllfiles (from the.zip). - Compile the Octave plugin (
.octfile) withmkoctfile -lnlopt-0 --output nlopt_optimize.oct nlopt_optimize-oct.cc(mkoctfileis a program included with Octave). - Finally, move
libnlopt-0.dllto the octave\bindirectory so that Octave can find it.
