I am having a problem compiling the IPOPT Matlab mex file on Mac OS-X 10.6 (Snow Leopard). Specifically, I am able to compile, but the linker is giving me the errors listed below. In addition, I am getting a bunch of undefined symbols (I have no idea why). I am using Matlab R2009b 64-bit (i.e., the newly released version of Matlab for 64-bit Intel Macs). The configure command I used to compile the IPOPT library is as follows:<br>
<br>./configure --prefix=$HOME/ipopt/install ADD_CFLAGS="-fno-common -fexceptions -no-cpp-precomp -fPIC" ADD_CXXFLAGS="-fno-common -fexceptions -no-cpp-precomp -fPIC" ADD_FFLAGS="-x f77-cpp-input -fPIC -fno-common" FLIBS="-lgfortran -lg2c -lfrtbegin -lSystem" F77=gfortran CC=gcc CXX=g++ -disable-shared<br>
<br>If anyone can help me determine how to fix the problem, I am grateful.<br><br>- Anil<br><br>-> g++ -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -fno-common -fexceptions -no-cpp-precomp -fPIC -DMATLAB_MEXFILE -Wl,-twolevel_namespace -undefined error -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,/Applications/MATLAB_R2009b.app/extern/lib/maci64/mexFunction.map -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/anilvrao/ipopt/install/lib -lipopt -llapack -lblas -lm -ldl -lgfortran -lg2c -lfrtbegin -lSystem -L/Applications/MATLAB_R2009b.app/bin/maci64 -lmx -lmex -lmat -lstdc++<br>
<br>ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libg2c.dylib, file is not of required architecture<br>ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libfrtbegin.a, file is not of required architecture<br>
Undefined symbols:<br> "std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)", referenced from:<br>
Ipopt::StreamJournal::PrintImpl(Ipopt::EJournalCategory, Ipopt::EJournalLevel, char const*)in libipopt.a(IpJournalist.o)<br> Ipopt::StreamJournal::PrintfImpl(Ipopt::EJournalCategory, Ipopt::EJournalLevel, char const*, __va_list_tag*)in libipopt.a(IpJournalist.o)<br>
ld: symbol(s) not found<br>collect2: ld returned 1 exit status<br><br> mex: link of ' "ipopt.mexmaci64"' failed.<br><br><br clear="all"><br>-- <br>Anil V. Rao<br>Assistant Professor<br>Dept. of Mechanical and Aerospace Engineering<br>
University of Florida<br>MAE-A Room 314<br>Gainesville, FL 32611-6250<br>E-mail: <a href="mailto:anilvrao@ufl.edu">anilvrao@ufl.edu</a><br>Tel: (352) 392-5523 (office)<br> (352) 672-1529 (cell)<br><br>