我有一些调用Mex函数的代码。我编译了Mex函数并尝试调用代码,并得到此错误:
Invalid MEX-file '/v/filer4b/v41q001/evouga/projects/gptoolbox/mex/selfintersect.mexa64': libboost_thread.so.1.54.0: cannot open
shared object file: No such file or directory
但是那个库肯定在LD_LIBRARY_PATH上:
>> getenv('LD_LIBRARY_PATH')
ans =
/lusr/opt/boost-1.54/lib:/v/filer4b/software/matlab-r2014a/sys/os/glnxa64:/v/filer4b/software/matlab-r2014a/bin/glnxa64:/v/filer4b/software/matlab-r2014a/extern/lib/glnxa64:/v/filer4b/software/matlab-r2014a/runtime/glnxa64:/v/filer4b/software/matlab-r2014a/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/v/filer4b/software/matlab-r2014a/sys/java/jre/glnxa64/jre/lib/amd64/server
而且我知道“没有这样的文件或目录”有时可能意味着“文件存在很好,但是是为错误的架构而构建的,无论出于何种原因,我们将打印出一个明显的谎言作为错误消息。”但是当我检查时
>> !file /lusr/opt/boost-1.54/lib/libboost_thread.so.1.54.0
/lusr/opt/boost-1.54/lib/libboost_thread.so.1.54.0: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=0x9ebc964acececa3632afe12b3526fe38f5b8c3eb, not stripped
似乎没问题:64位库与64位.mexa64文件匹配。
>> !file /v/filer4b/v41q001/evouga/projects/gptoolbox/mex/selfintersect.mexa64
/v/filer4b/v41q001/evouga/projects/gptoolbox/mex/selfintersect.mexa64: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, not stripped
接下来我应该怎么做以弄清楚发生了什么?