<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I am trying to install ipopt and use it with matlab. I have used the instructions mentioned on following webpage.</div><div><a href="https://projects.coin-or.org/Ipopt/wiki/Ipopt_on_Mac_OS_X">https://projects.coin-or.org/Ipopt/wiki/Ipopt_on_Mac_OS_X</a></div><div><br></div><div>I have used snow leopard,HSL MA 57,<span class="Apple-style-span" style="font-family: Verdana, Arial, 'Bitstream Vera Sans', Helvetica, sans-serif; font-size: 13px; ">native OS X </span> with 64 bit matlab 2011.</div><div>When I run the given examples in ipopt, matlab crashes. I suppose it is because of mex file.</div><div>Let me give you more details about the makefile in src folder.</div><div><br></div><div>Originally LIBS line in the makefile had </div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">LIBS = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -framework vecLib -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -lgfortranbegin -lgfortran -lSystem -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -framework vecLib -framework vecLib -lm -ldl</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">I changed it to </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">LIBS = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl</div><div><br></div><div><br></div><div>when I make the file, the result on the terminal is </div><div><br></div><div><div>-> mexopts.sh sourced from directory (DIR = $PREF_DIR)</div><div> FILE = /Users/siddharthgoyal/.matlab/R2011b/mexopts.sh</div><div>----------------------------------------------------------------</div><div>-> MATLAB = /Applications/MATLAB_R2011b.app</div><div>-> CC = g++</div><div>-> CC flags:</div><div> CFLAGS = -fno-common -no-cpp-precomp -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -fexceptions</div><div> CDEBUGFLAGS = -g</div><div> COPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE </div><div> CLIBS = -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++</div><div> arguments = -DMX_COMPAT_32</div><div>-> CXX = g++</div><div>-> CXX flags:</div><div> CXXFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5</div><div> CXXDEBUGFLAGS = -g</div><div> CXXOPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE </div><div> CXXLIBS = -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++</div><div> arguments = -DMX_COMPAT_32</div><div>-> FC = gfortran</div><div>-> FC flags:</div><div> FFLAGS = -fexceptions -m64 -fbackslash</div><div> FDEBUGFLAGS = -g</div><div> FOPTIMFLAGS = -O</div><div> FLIBS = -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -L -lgfortran -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -lgfortranbegin</div><div> arguments = -DMX_COMPAT_32</div><div>-> LD = g++</div><div>-> Link flags:</div><div> LDFLAGS = -Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,/Applications/MATLAB_R2011b.app/extern/lib/maci64/mexFunction.map -framework vecLib</div><div> LDDEBUGFLAGS = -g</div><div> LDOPTIMFLAGS = -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE </div><div> LDEXTENSION = .mexmaci64</div><div> arguments = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl</div><div>-> LDCXX = </div><div>-> Link flags:</div><div> LDCXXFLAGS = </div><div> LDCXXDEBUGFLAGS = </div><div> LDCXXOPTIMFLAGS = </div><div> LDCXXEXTENSION = </div><div> arguments = -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl</div><div>----------------------------------------------------------------</div><div><br></div><div>-> g++ -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DIPOPT_BUILD -DMATLAB_MEXFILE -Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,/Applications/MATLAB_R2011b.app/extern/lib/maci64/mexFunction.map -framework vecLib -o "ipopt.mexmaci64" "matlabexception.o" "matlabfunctionhandle.o" "matlabjournal.o" "iterate.o" "ipoptoptions.o" "options.o" "sparsematrix.o" "callbackfunctions.o" "matlabinfo.o" "matlabprogram.o" "ipopt.o" -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lipopt -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinhsl -L/Users/siddharthgoyal/Documents/build/Ipopt-3.10.1/build64/lib -lcoinmetis -lm -ldl -L/Applications/MATLAB_R2011b.app/bin/maci64 -lmx -lmex -lmat -lstdc++</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Please let me know if this is a successful compilation. If yes, why does the matlab crash. If not, how can it be fixed.</div><div><br></div><div><br></div><div>Thanks</div><div>Siddharth</div></div></body></html>