简体   繁体   English

由于未定义的符号,无效的MEX文件

[英]Invalid MEX-file due to undefined symbol

I am trying to build MEX modules, but I am having runtime issues with undefined symbols. 我正在尝试构建MEX模块,但我遇到了未定义符号的运行时问题。 Here is the output 这是输出

Invalid MEX-file '/home/glperez/issm/trunk-jpl/lib/TriMesh.mexa64':
/home/glperez/issm/trunk-jpl/lib/libISSMCore.so: undefined symbol: _ZN14ToolkitOptions14toolkitoptionsE

Error in triangle (line 40)
[elements,x,y,segments,segmentmarkers]=TriMesh(domainname,riftname,area);

Error in test101 (line 1)
md=triangle(model(),'../Exp/Square.exp',50000.);

Checking the symbols in 'libISSMCore.so' confirms the undefined symbol 检查'libISSMCore.so'中的符号确认未定义的符号

$ nm ./lib/libISSMCore.so | grep 'toolkit'
U _ZN14ToolkitOptions14toolkitoptionsE

However, the symbol appears in 'TriMesh.mexa64': 但是,符号出现在'TriMesh.mexa64'中:

$ nm ./lib/TriMesh.mexa64 | grep 'toolkit'
00000000002391b8 b _ZN14ToolkitOptions14toolkitoptionsE

As I understand it, the lowercase 'b' means that the symbol is in the uninitialized section and that it is local versus global. 据我了解,小写的“b”表示符号位于未初始化的部分,而且是本地符号和全局符号。

Is the problem here have to do with the symbol being local, uninitialized or something else? 这里的问题是否与本地符号,未初始化或其他内容有关?

As I understand it, the lowercase 'b' means that the symbol is in the uninitialized section and that it is local 据我了解,小写'b'表示符号位于未初始化的部分,而且它是本地的

The symbol is local, and is in zero-initialized (aka BSS) section. 符号是本地的,并且处于零初始化(也称为BSS)部分。

Yes, the problem is that it is local, ie no accessible outside of the TriMesh.mexa64 library. 是的,问题是它是本地的,即在TriMesh.mexa64库之外无法访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 由于未定义符号“start_time”,MEX 文件无效 - Invalid MEX-file due to undefined symbol 'start_time' 无效的 MEX 文件 libmkl_rt.so:无法打开 - Invalid MEX-file libmkl_rt.so: cannot open 当文件位于当前文件夹中时,为什么会出现错误“无效的MEX文件”? - why am I getting the error “Invalid MEX-file”, while the file is in the current folder? 如果Matlab以GUI开始,如何从MEX文件中检查 - How to check from MEX-file if Matlab started with GUI MATLAB MEX文件构建成功,但未显示任何内容 - MATLAB MEX-file builds successfully but nothing is displayed 如何在我的 MEX 文件中使用 OpenMP 而不会导致 MATLAB 崩溃? - How to use OpenMP in my MEX-file without crashing MATLAB? Matlab的Mex文件使用向量类定义 - Matlab's Mex-file using a vector class definition MEX文件可在循环中将脉冲输出到DAQ板 - MEX-File to Output Pulse in a Loop to a DAQ-Board 使用mexCallMATLAB的matlab mex文件比相应的m文件慢近300倍 - Matlab mex-file with mexCallMATLAB is almost 300 times slower than the corresponding m-file 如果瓶颈是一个大的矩阵乘法,我可以使用MEX文件加速我的MATLAB代码吗? - Can I speed up my MATLAB code using a MEX-file if the bottleneck is a big matrix multiplication?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM