Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: running a c++ program using unix command
Date: Tue, 12 May 2009 11:47:01 +0000 (UTC)
Organization: LG &#51204;&#51088;
Lines: 25
Message-ID: <gubnjl$g4b$1@fred.mathworks.com>
References: <gj7286$dm1$1@fred.mathworks.com> <op.unvdjikya5ziv5@uthamaa.dhcp.mathworks.com> <gkvmlm$8cq$1@fred.mathworks.com> <gqte8t$kl$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1242128821 16523 172.30.248.37 (12 May 2009 11:47:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 12 May 2009 11:47:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1561033
Xref: news.mathworks.com comp.soft-sys.matlab:539223


"free seek" <nospam@gmail.com> wrote in message <gqte8t$kl$1@fred.mathworks.com>...
> Did you try running matlab with the command
> LD_PRELOAD=/lib/libgcc_s.so.1:/usr/lib/libstdc++.so.6 matlab
> I had the same problem and change the environment variable LD_LIBRARY_PATH did not do anything for me. Using the command
> setenv('LD_PRELOAD','/lib/libgcc_s.so.1:/usr/lib/libstdc++.so.6');
> from matlab also did not do anything. Does anybody have an explanation for this?

I have the similar problem in R2009a. There was no problem in R2008a.
I have encounter the following problem to build rapid accelerator simulation execution file.

/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libmwservices.so: undefined reference to `std::bad_alloc::what() const@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libut.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<bool>(bool)@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libmwsl_solver_rtw.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<unsigned long>(unsigned long)@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libut.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<long>(long)@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libmwm_interpreter.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<unsigned long>(unsigned long&)@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libmwm_interpreter.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<void const*>(void const*)@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libmwsl_solver_rtw.so: undefined reference to `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)@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libmwsl_solver_rtw.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<double>(double)@GLIBCXX_3.4.9'
/home/junghs/bin/MATLAB_2009a/bin/glnxa64/libmwm_interpreter.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<double>(double&)@GLIBCXX_3.4.9'

I have two kinds of linux platform, Ubuntu & centOS.
To solve the above problem in Ubuntu OS, I have just copied 'libstdc++.so.6.0.9' (which is provided by matlab) to /usr/lib directory and have made soft link to 'libstdc++.so.6'. After this operation, I have cleared the above problem.
But I cannot clear this issue in centOS platform. Please give me your precious comments.

Thanks.