I have been trying to follow this example for compiling vtk in MATLAB using mex, on an Ubuntu 11.10. The mex command I used is as follows:
mex -I/usr/include/vtk-5.6 vtk_file.cpp -L/usr/lib/ -lvtkFiltering -lvtkRendering -lvtkCommon
After compilation I have a .mexa64
file.
However, when I try to run the file I end up with the following error:
Invalid MEX-file '/home/bill/Documents/MATLAB/vtk/vtk_file.mexa64':
/usr/local/MATLAB/R2011b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6:
version `GLIBCXX_3.4.11' not found (required by /usr/lib/libvtkFiltering.so.5.6)
How can I ensure that glibcxx is found? I would have assumed that it would be included by default in the compilation.