在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1、The first step is download tw folders, one comes from https://nlopt.readthedocs.io/en/latest/NLopt_on_Windows/ (64 version) Another 64-bit Windows DLLs, built with MinGW, which comes from http://ab-initio.mit.edu/wiki/index.php?title=NLopt_on_Windows&redirect=no 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 ) dumpbin /EXPORTS yourfile.dll > yourfile.exports 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: LIBRARY libnlopt.dll EXPORTS Then, still under Developer Command Prompt for VS2013, excute command: lib /def:libnlopt.def /machine:x64 Finally, do the following steps % 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 the mex steup succeed!
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论