我正在尝试安装netgen(从源代码构建)。 因此需要Togl,我通过
安装它sudo apt-get install libtogl1 libtogl-dev
输入'make'时,我收到以下错误消息:
/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'
也许Togl没有正确安装。这是32位64位发行版吗? 我该怎么做才能解决这个问题?
答案 0 :(得分:5)
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中没有works with tcl8.5 and 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