I'm having a very hard time trying to install NLopt on Windows. I have managed to install it using Ubuntu on WSL, but that doesn't really work for me, I have to have it installed on Windows.
In NLopt documentation, instructions for installation are provided here and specific instructions for installation on Windows are provided here. I've tried everything but just can't make it work.
I want to use it on C++, and I have even followed these instructions on how to build the project on Windows using Visual Studio, and have managed to get all the steps right until there without problems. After building the way it was suggested, I could see a nlopt.hpp
inside ~/nlopt/build/
, but there is no nlopt.h
there. So when I include #include "nlopt.hpp"
and try to compile my code, I get the errors "E1696: cannot open source file nlopt.h" and "C1083: Cannot open include file: 'nlopt.h': No such file or directory". Of course it will give me errors, because the .h
file simply doesn't exist. But I don't know what else to do.
Can anyone help me? I would really appreciate if a step-by-step solution could be provided from the very beggining. Thanks a lot in advance!