Why do I receive a 'warning: libstdc++-libc6.1-2.so.3 …' when I try to compile stand-alone code on Linux Redhat 7.0 with the MATLAB C/C++ Math LIbrary 2.1 (R12)?
I am receiving the following error from mbuild when trying to compile a stand-alone application for Linux (Redhat 7.0):
/usr/bin/ld: warning: libstdc++-libc6.1-2.so.3, needed by /usr/local/matlab6/extern/lib/glnx86/libmatpp.so, not found (try using --rpath)
The "mbuild" command invokes:
g++ -Wl,--rpath-link,/usr/local/matlab6/bin/glnx86 -L/usr/local/matlab6/bin/glnx86 -o test2 <all the .o files ...> -Wl,--rpath-link,/usr/local/matlab6/bin/glnx86 -L/usr/local/matlab6/extern/lib/glnx86 -lmatpp -lmmfile -lmatlb -lmat -lmx -lm
"ldconfig" gives the following:
libstdc++.so.2.9 -> libstdc++.so.2.9.dummy libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2 -> libstdc++-2-libc6.1-1-2.9.0.so libstdc++.so.2.8 -> libstdc++.so.2.8.0 libstdc++.so.2.7.2 -> libstdc++.so.2.7.2.8 libstdc++.so.27 -> libstdc++.so.27.1.4
And this from "rpm":
libstdc++-devel-2.96-54 compat-libstdc++-6.2-2.9.0.9 libstdc++-2.96-54
To get things to compile, I "downgraded" to libstdc++-libc6.1-2.so.3 using
the libstdc++-2.95.1_2.10.0-3-i386.rpm file. However, I am a bit perplexed
as to why the "2-2.so.3" version (as opposed to "1-2.so.3") is not used,
having a higher major revision number.
Best Answer