I have a problem getting NLopt to work on windows (using Visual C++ .NET 2002 and Windows XP) I have tried to download the precompiled dll, build the .lib file (using both Visual Studio and MinGW) and compiling the C test tutorial from the web page (using Visual C++).
I also tried to compile NLopt from source using CMake/Visual Studio and the CMakeLists.txt and config.cmake.h.in provided on the web page and linking to the resulting .lib file when compiling the test tutorial. In both cases I can compile the program, but when I run it I get the following error: "An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module. Additional information: Could not load type nlopt_opt_s from assembly NLopt_app, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. " I also tried to use the NLopt in Matlab (R2010b) where I got some more info from the error messages. When I ran mex I got a bunch of errors: mex nlopt_optimize.c nlopt.lib Writing library for nlopt_optimize.mexw32 c:\temp\mex_dy~1\nlopt_optimize.obj .text: undefined reference to '_nlopt_destroy@4' c:\temp\mex_dy~1\nlopt_optimize.obj .text: undefined reference to '_nlopt_create@8' ... C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'nlopt_optimize.mexw32' failed. ??? Error using ==> mex at 208 Unable to complete successfully. Any ideas on what the problem could be? Thank you
_______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
