<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Get errors of the Ipopt Mex file in Matlab</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hello all,<BR>
<BR>
I am trying to use Ipopt in Matlab. I (succesufully?) generated an ipopt.mexglx file and added its path to matlab. But when I tried to run the examples, I got this message:<BR>
<BR>
>> examplehs038<BR>
??? Invalid MEX-file '/home/gao/CoinIpopt/build/lib/ipopt.mexglx':<BR>
/opt/matlab/R2008a/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version<BR>
`GLIBCXX_3.4.9' not found (required by<BR>
/home/gao/CoinIpopt/build/lib/libipopt.so.0).<BR>
<BR>
Error in ==> examplehs038 at 33<BR>
[x info] = ipopt(x0,funcs,options);<BR>
<BR>
It seems possibly that my gcc version is inconsistent with libstdc++, so I check their versions. And I have<BR>
<BR>
||/ Name Version Description<BR>
+++-==============-==============-============================================<BR>
ii gcc 4:4.2.3-1ubunt The GNU C compiler<BR>
ii g++ 4:4.2.3-1ubunt The GNU C++ compiler<BR>
ii gfortran 4:4.2.3-1ubunt The GNU Fortran 95 compiler<BR>
<BR>
ii libstdc++6 4.2.4-1ubuntu4 The GNU Standard C++ Library v3<BR>
ii libstdc++6-4.2 4.2.4-1ubuntu4 The GNU Standard C++ Library v3 (debugging f<BR>
ii libstdc++6-4.2 4.2.4-1ubuntu4 The GNU Standard C++ Library v3 (development<BR>
ii libstdc++6-4.2 4.2.4-1ubuntu4 The GNU Standard C++ Library v3 (documentati<BR>
<BR>
It seems OK. I have no idea what's going wrong. I am using matlab 7.6 and ubuntu 8.04 and run the configure script via<BR>
<BR>
./configure \<BR>
ADD_CXXFLAGS="-fPIC -fexceptions" \<BR>
ADD_CFLAGS="-fPIC -fexceptions" \<BR>
ADD_FFLAGS="-fPIC -fexceptions"<BR>
<BR>
Thanks.<BR>
<BR>
Gao, Zhengyuan<BR>
<BR>
----------------------------------------------------------<BR>
University of Amsterdam, FEB/ Department of Quantitative Economics<BR>
Roetersstraat 11, 1018WB, Amsterdam<BR>
Tel: +31 20 525 4221<BR>
Emai: z.gao@uva.nl<BR>
<A HREF="http://home.uva.nl/z.gao">http://home.uva.nl/z.gao</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>