Thank you very much for this file, it is exactly what I was looking for. However, the only computer I have access to has Winows 7. Can someone tell me what I can do to run it please? I would very much appreciate any help as it has a lot of important in my thesis and it is due soon.
I have successfully compiled the 32bit and 64bit version on Windows.
Some advice: It will be much easier if the compilers Microsoft Visual Studio and Intel Visual Fortran are used.
Thank Jorge Nocedal and Peter Carbonetto for making the L-BFGS-B available in matlab!
I am installing the win32 platform following Guillaume JACQUENOT's steps and using MATLAB7. My computer has Windows 7.
In my case, I have to add
in matlabstring.cpp before to compile it
(mex -v -g -c -f mexopts.bat matlabstring.cpp).
I have successed on compile:
mex -v -g -c -f mexopts_fortran.bat solver.f
mex -v -g -c -f mexopts.bat arrayofmatrices.cpp
mex -v -g -c -f mexopts.bat lbfgsb.cpp
mex -v -g -c -f mexopts.bat matlabexception.cpp
mex -v -g -c -f mexopts.bat matlabmatrix.cpp
mex -v -g -c -f mexopts.bat matlabprogram.cpp
mex -v -g -c -f mexopts.bat matlabscalar.cpp
mex -v -g -c -f mexopts.bat matlabstring.cpp
mex -v -g -c -f mexopts.bat program.cpp
However, I can not achieve to compile:
mex -v -g -f mexopts.bat -output lbfgsb *.obj. I have this error:
collect2: ld returned 1 exit status
link command: g++ -shared C:\Users\JU\APPLIC~1\MATHWO~1\MATLAB\R14\gnumex\mex.def -o lbfgsb.dll -g -Wl,--image-base,0x28000000\n -LC:\Users\JU\APPLIC~1\MATHWO~1\MATLAB\R14\gnumex arrayofmatrices.obj lbfgsb.obj matlabexception.obj matlabmatrix.obj matlabprogram.obj matlabscalar.obj matlabstring.obj program.obj solver.obj -llibmx -llibmex -llibmat
C:\MATLAB7\BIN\WIN32\MEX.PL: Error: Link of 'lbfgsb.dll' failed.
I would be very grateful to any help. Thanks,