Rank: 33352 based on 0 downloads (last 30 days) and 0 file submitted

Paul Van Hoven


Personal Profile:


Watch this Author's files


Comments and Ratings by Paul Van Hoven
Updated File Comments Rating
08 Feb 2011 MATLAB interface for L-BFGS-B Matlab interface to the L-BFGS-B nonlinear optimization algorithm Author: Peter Carbonetto

It is possible to compile the stuff on Mac OS X with Matlab 2009b 64Bit. I expect this to work with later 64Bit versions as well. Pay attention to the following changes in the makefile:
For Matlab 2009b you will need gfortran version 4.3.x. If you don't have it compile it. I put the custom compiled version of gfortran into /usr/local/gcc-4.3.5. Therefore the pathnames:

In the Makefile set the old variables to the following new values:
# Mac OS X settings.
MEX = /Applications/MATLAB_R2009b.app/bin/mex
MEXSUFFIX = mexmaci64
MATLAB_HOME = /Applications/MATLAB_R2009b.app
CXX = g++
F77 = /usr/local/gcc-4.3.5/bin/gfortran
CFLAGS = -O3 -fPIC -fno-common -fexceptions -no-cpp-precomp -arch x86_64 -m64
FFLAGS = -O3 -x f77-cpp-input -fPIC -fno-common -m64

And in the linker part of the Makefile make shure you have something like this:
$(MEX) -cxx CXX=$(CXX) CC=$(CXX) FC=$(FCC) LD=$(CXX) -L/usr/local/gcc-4.3.5/lib/x86_64 -lgfortran -lm \
-O -output $@ $^

Note, that you have to replace -lg2c with -lgfortran and make shure you link against the 64 Bit version of the library. As you can see, the 64 bit lib lies in an separate folder called x86_64 which lies in the 32 bit folder.

Contact us