[英]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.