'libdenpli.so:对符号'Tcl_InitStubs'的未定义引用



我在创建可执行文件时遇到'libdenpli.so : undefined reference to symbol 'Tcl_InitStubs'

当我检查nm时,我得到以下输出:

nm libdenpli.so | grep Tcl_InitStubs
U denaliTcl_InitStubs

我查看了其他具有不同平台的机器,它工作正常。我看到了t的输出:

nm libdenpli.so | grep Tcl_InitStubs
<address> t denaliTcl_InitStubs 

有什么区别?

正如您在nm的手册页中看到的:

"t" The symbol is in the text (code) section.
"U" The symbol is undefined.

换句话说,您的libdenpli.so使用符号,但不定义它 - 您还需要链接到定义该符号的库。

由于其他系统的库似乎定义了它,因此由于版本、平台、构建选项等原因,库应该如何链接可能存在差异。 尝试查看库的文档,看看你应该如何链接到它。

最新更新