libTogl未定义的引用 [英] libTogl undefined references

查看:637
本文介绍了libTogl未定义的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图安装netgen(从源代码构建)。
因此需要Togl,我通过

安装它$ sudo apt-get install libtogl1 libtogl-dev

输入'make'时,我收到以下错误消息:

  /usr/lib/gcc/x86_64-linux-gnu/4.8 /../../../../ lib / libTogl.so:对'Tk_InitStubs'的未定义引用
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so:对'tkStubsPtr'的未定义引用
/ usr / lib / gcc / x86_64-linux-gnu / 4.8 /../../../../ lib / libTogl.so:对'Tcl_InitStubs'的未定义引用
/ usr / lib / gcc / x86_64-linux -gnu / 4.8 /../../../../ lib / libTogl.so:对`tclStubsPtr'的未定义引用

也许Togl没有正确安装。这是一个32位64位issu吗?
我应该怎么做才能解决这个问题?解析方案

这是连接到正确版本的Tcl和Tk,如@ keltar所述。如果你的目标是从源头上构建Netgen,最好的办法是坚持使用 netgen-5.3.1 ,其中使用tcl8。 5和tk8.5

我碰到这个问题,因为当我运行 sudo apt-get install tcl-dev tk- dev ,apt-get为我提取了tcl8.6和tk8.6。 (如果您在线搜索这些问题,您可以看到,有时可以通过更新Tcl / Tk版本来解决这些链接问题。)我卸载了默认的tcl-dev和tk-dev软件包,并安装了tcl8.5-dev和tk8。 5-dev代替。



一旦您有最适合的Tcl / Tk版本,您可以从源代码安装Netgen。例如,

  ./ configure --with-tclconfig = / usr / lib / tcl8.5 / --with-tkconfig = / usr / lib / tk8.5 / 
make
make install


I am trying to install netgen (build from source). Therefore Togl is needed and I installed it via

sudo apt-get install libtogl1 libtogl-dev

When typing 'make' I receive the following error messages:

/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `Tk_InitStubs'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `tkStubsPtr'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `Tcl_InitStubs'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libTogl.so: undefined reference to `tclStubsPtr'

Maybe Togl was not installed right. Is this an 32bit 64bit issu? What should I do to fix this?

解决方案

This is an issue with linking to the correct versions of Tcl and Tk, as @keltar mentioned. If your goal is to build Netgen from source, your best bet is to stick with netgen-5.3.1, which works with tcl8.5 and tk8.5.

I ran into this issue because when I ran sudo apt-get install tcl-dev tk-dev, apt-get fetched tcl8.6 and tk8.6 for me. (If you search online for these issues you can see that these linking issues can sometimes be resolved by updating your Tcl/Tk version.) I uninstalled the default tcl-dev and tk-dev packages and installed tcl8.5-dev and tk8.5-dev instead.

Once you have the best fit version of Tcl/Tk, you can install Netgen from source. For example,

./configure --with-tclconfig=/usr/lib/tcl8.5/ --with-tkconfig=/usr/lib/tk8.5/
make
make install

这篇关于libTogl未定义的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆