Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NLopt on Windows - Octave plugin instructions #274

Open
jcottrell-ellex opened this issue Jun 4, 2019 · 0 comments
Open

NLopt on Windows - Octave plugin instructions #274

jcottrell-ellex opened this issue Jun 4, 2019 · 0 comments

Comments

@jcottrell-ellex
Copy link

The process for installing NLOpt as an Octave plugin on Windows requires a bit more improvising than should be necessary. Perhaps the "NLOpt on Windows" instructions and process could be updated. Some hurdles I found:

  1. Instructions point to the latest version of nlopt_optimize-oct.cc in the repo, which is newer than the v2.6.1 DLL and therefore the two are not compatible (nlopt_set_x_weights() has been added since v2.6.1).
  2. The header file "nlopt_optimize_usage.h" is included by nlopt_optimize-oct.cc, but didn't exist on my system. I found it in a couple of places online, but not in the official repo.
  3. It can be tricky to get all files in the right place for mkoctfile. I got it to work by copying the library files, headers and cc file all to one directory, cd'd to that directory in octave, then called mkoctfile with "-L." arg so that it looks for the library in the current dir.
  4. There's no longer an "octave.exe" file to move the NLOpt .oct file and DLL next to. I used "C:\Octave\Octave-5.1.0.0\mingw64\lib\octave\5.1.0\site\oct\x86_64-w64-mingw32", but you can alternatively put them elsewhere and add that directory to the octave path. I'm not sure about best practise for this.
  5. The tutorial script doesn't run because it doesn't know that "NLOPT_LD_MMA" means 24. This can be solved by copying all the .m files from the octave folder in the repo, into the same folder as the dll and oct files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant