Add a guide for compiling in Windows#287
Open
mahyaret wants to merge 2 commits intostevengj:masterfrom
Open
Conversation
stevengj
reviewed
Jul 22, 2019
stevengj
reviewed
Jul 22, 2019
stevengj
reviewed
Jul 22, 2019
doc/docs/NLopt_on_Windows.md
Outdated
| 3. Create a folder named "nlopt" inside `C:\Octave\Octave-X.X.X.X\mingw64\lib\cmake` | ||
| 4. Copy `NLoptConfig.cmake`, `NLoptConfigVersion.cmake`, `NLoptLibraryDepends.cmake`, and `NLoptLibraryDepends-release.cmake` from `build` and `build\CMakeFiles\Export\lib\cmake\nlopt`, respectively, to `C:\Octave\Octave-X.X.X.X\mingw64\lib\cmake` | ||
| 5. Copy `nlopt.pc` from `build` to `C:\Octave\Octave-X.X.X.X\mingw64\lib\pkgconfig` | ||
| 6. Copy `libnlopt.dll.a` from `build` to `C:\Octave\Octave-X.X.X.X\mingw64\lib` |
Owner
There was a problem hiding this comment.
Can't you pass a -L flag to mkoctfile?
Author
There was a problem hiding this comment.
I couldn't, unless I did not understand your point completely...
stevengj
reviewed
Jul 22, 2019
stevengj
reviewed
Jul 22, 2019
stevengj
reviewed
Jul 22, 2019
doc/docs/NLopt_on_Windows.md
Outdated
| 2. Download [`nlopt_optimize-oct.cc`](https://github.com/stevengj/nlopt/raw/master/src/octave/nlopt_optimize-oct.cc) and put it in the same directory as the `.dll` and `.dll.a` files. | ||
| 3. Compile the Octave plugin (`.oct` file) with `mkoctfile -lnlopt --output nlopt_optimize.oct nlopt_optimize-oct.cc` (`mkoctfile` is a program included with Octave). | ||
| 4. Finally, move `libnlopt.dll` to the *octave*``bin` directory (the location of `octave.exe`) so that Octave can find it. | ||
| 1. Copy `libnlopt.dll` from `build` to `C:\Octave\Octave-X.X.X.X\mingw64\bin` |
Owner
There was a problem hiding this comment.
Couldn't you just do make DESTDIR=C:\Octave\Octave-X.X.X.X\mingw64 install to install everything?
Author
There was a problem hiding this comment.
It did not work for me. That's why I went for MSYS path...
stevengj
reviewed
Nov 21, 2020
| @@ -0,0 +1,47 @@ | |||
| --- | |||
| # NLopt on Windows | |||
| --- | |||
Owner
There was a problem hiding this comment.
Did this file get included accidentally?
stevengj
reviewed
Nov 21, 2020
stevengj
reviewed
Nov 21, 2020
| @@ -0,0 +1,192 @@ | |||
| #define NLOPT_OPTIMIZE_USAGE \ | |||
Owner
There was a problem hiding this comment.
This file is supposed to be generated by cmake, no?
Author
There was a problem hiding this comment.
It was not for me, I had to add it manually.
Collaborator
|
hello @mahyaret, any news here ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Thanks for your awesome repo. I compiled this project in Windows and faced bunch of issues. I tried to address them in this guide. BTW, for compiling, I had to add the header file.
I thought these descriptions would help other users too, so I've opened this pull request.
Thanks again,
Mahyar