实现nlopt为matlab接口API(非线性约束下的最优化)
2021-01-29 10:14
标签:link command mac director def index path dll eve 1、The first step is download tw folders, one comes from Another 64-bit Windows DLLs, built with MinGW, which comes from 2、 Then cd into the folder with a use the command below to generate libnlopt.exports (the command is done under Developer Command Prompt for VS2013 ) Then select all the defined functions and copy them to a new file and name it as libnlopt.def, in the its header, add two lines: Then, still under Developer Command Prompt for VS2013, excute command: Finally, do the following steps the mex steup succeed! 实现nlopt为matlab接口API(非线性约束下的最优化) 标签:link command mac director def index path dll eve 原文地址:https://www.cnblogs.com/seisjun/p/11867071.htmlhttps://nlopt.readthedocs.io/en/latest/NLopt_on_Windows/ (64 version)
http://ab-initio.mit.edu/wiki/index.php?title=NLopt_on_Windows&redirect=no
bin
subdirectory that contains libnlopt.dll,
dumpbin /EXPORTS yourfile.dll > yourfile.exports
LIBRARY libnlopt.dll
EXPORTS
lib /def:libnlopt.def /machine:x64
% chage directory
cd(‘Directory of nlopt‘);
% add the files to the search directory
addpath(genpath(‘Directory of nlopt‘));
% build, link to header and link to .lib file (no space between -I, -L, and -l)
mex .\matlab\nlopt_optimize.c -IDirectory of nlopt -LDirectory of nlopt -llibnlopt
文章标题:实现nlopt为matlab接口API(非线性约束下的最优化)
文章链接:http://soscw.com/essay/48637.html