Okay I think I solved my issue. For those who may find themselves in a similar bind, this link is a much better source for installing NLopt than their own documentation.
Attempting to Install NLopt and finding the instructions opaque. How do I generate this mex file?
29 views (last 30 days)
Show older comments
I am following these instructions and have downloaded and unzipped the precompiled build. However, I am having trouble with the next steps. The instructions link to a stack overflow forum and the Mathworks forums for further instructions, but I believe that I am even missing certain steps in between the download and where those users begin their questions. According to this I need to generate a .lib file from the .dll files provided. I have tried searching and have not found any means of doing this. I also attempt to compile the mex file by using
mex -v (my file path)\MATLAB\NLopt\_\nlopt-optimize.c
However, I receive this error:
"Error using mex
(my file path)\MATLAB\NLopt\_\nlopt-optimize.c:31:19: fatal error: nlopt.h: No such file or directory
#include "nlopt.h"
compilation terminated."
This suggests to me that I am in general missing a file anyway, and I don't know where to get it.
I am using MinGW as my compiler and my version is R2019a. What do I do? I realize I may be asking a pretty big question, but I genuinely don't know where to go from here.
Answers (0)
See Also
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!