rmcantin / bayesopt

BayesOpt: A toolbox for bayesian optimization, experimental design and stochastic bandits.
GNU Affero General Public License v3.0
396 stars 92 forks source link

Issue in MATLAB compilation #24

Closed earthat closed 2 years ago

earthat commented 5 years ago

Hi I have been trying to install this on windows platform in MATLAB 2018a. After building successfully using mingw32, matlab_compile.m shows error MEX cannot find library 'bayesopt' specified with the -l option. MEX looks for a file with one of the names: libbayesopt.lib bayesopt.lib Please specify the path to this library with the -L option.

The lib files generated after building the source code are located in build/lib however they have extension of libbayesopt.a and libnlopt.a. The MATLAB are looking for .lib files. How can this issue be resolved.

rmcantin commented 4 years ago

Static libraries in Windows usually end in .lib. You should not have .a files. Anyway, the simplest fix would be to edit matlab_compile.m to point to the correct file path.