invalid mex file error (libstd++ version)

强颜欢笑 提交于 2019-12-24 13:01:46

问题


I compiled some codes in Matlab on a Linux system, and .mexa64 files has been generated, but in run time, I get the following error:

Invalid MEX-file '/*.mexa64': /matlab-8.5/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.8' not found.

i tried setting -rpath in make file by two following commands in matlab make file: LDFLAGS="\$LDFLAGS -rpath=/usr/local/GNU/glibc-2.22/lib/"

LDFLAGS="\$LDFLAGS -dynamic-linker=/usr/local/GNU/glibc-2.22/lib/ld-linux-x86-64.so.2"

But, it cannot solve the problem.


回答1:


This worked for my case: Goto your matlab installation: cd /usr/local/MATLAB/R2015a/sys/os/glnxa64 and rename these two files: sudo mv libstdc++.so.6 libstdc++.so.6.orig sudo mv libgcc_s.so.1 libgcc_s.so.1.orig



来源:https://stackoverflow.com/questions/35644956/invalid-mex-file-error-libstd-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!