I am trying to compile a c++ ubuntu project via matlab here. When I am trying to use it after the compilation with make command, I am getting the following error:
Invalid MEX-file
'////fashionista_v0.2/lib/+bsr/buildW.mexglx':
//local/MATLAB/R2011a/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6: version
`GLIBCXX_3.4.11' not found (required by
////fashionista_v0.2/lib/+bsr/buildW.mexglx)
I am not familiar with those processes, so I couldnt understand the several proposed solutions like that. What is exactly libstdc++ and GLIBCXX and how can I solve the problem?
I am trying to fix the problem using the proposed link from nkjt:
export LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH
However, due to lack of unix shell knowledge I don't understand what to put in the command. I am have locate libstdc++ .a and .so file which is in gcc folder /usr/lib/gcc/i686-linux-gnu/4.6
and I am trying the following:
export LD_LIBRARY_PATH=/usr/lib/gcc/i686-linux-gnu/4.6:$LD_LIBRARY_PATH
However, my matlab error still exist. I am using Ubuntu 12.04 version with gcc 4.6 and matlab r2011a.
EDIT: I ve updated the matlab version to r2012a the problem still the same. I also tried the following:
sudo ln -s /usr/lib/cc/i686-linux-gnu/4.6/libstdc++.so libstdc++.so.6
I got failed to create the file the file already exists.
The output of usr/lib/libstdc++.so.6 | grep GLIBC:
GLIBCXX_3.4
GLIBCXX_3.4.1
...
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBC_2.0
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.3.2
GLIBC_2.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
How can I ensure that I ve defined the right version of libstdc++?