-
Notifications
You must be signed in to change notification settings - Fork 602
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
Add a guide for compiling in Windows #287
base: master
Are you sure you want to change the base?
Conversation
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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you pass a -L
flag to mkoctfile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't, unless I did not understand your point completely...
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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you just do make DESTDIR=C:\Octave\Octave-X.X.X.X\mingw64 install
to install everything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did not work for me. That's why I went for MSYS path...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -0,0 +1,47 @@ | |||
--- | |||
# NLopt on Windows | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this file get included accidentally?
@@ -0,0 +1,192 @@ | |||
#define NLOPT_OPTIMIZE_USAGE \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is supposed to be generated by cmake
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not for me, I had to add it manually.
hello @mahyaret, any news here ? |
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