0
编译错误:TK与X11 - 具有依赖性编译错误:TK与X11 - 帮助依赖
我试图编译传统知识纳入我的代码,我有在获得X11在我的Makefile正确的依赖关系的困难提供帮助。要包括Tk我做了以下更改到我的Makefile:
LIBS64 = \
-ltk8.5 \
-ltcl8.5
在编译时,我得到以下错误。我已经编辑它,以减少混乱:
...
: undefined reference to `XDrawLine'
<local>/libtk8.5.a(ttkElements.o)(.text+0x16b0): In function `SliderElementDraw':
...
: undefined reference to `XFillPolygon'
<local>/libtk8.5.a(ttkElements.o)(.text+0x1bbd): In function `TabElementDraw':
...
: undefined reference to `XFillRectangle'
collect2: ld returned 1 exit status
摆脱这种错误我加-lX11我的Makefile:
LIBS64 = \
-ltk8.5 \
-ltcl8.5 \
-L/usr/X11R6/lib64 \
-lX11
在编译,我得到了以下错误。我已经编辑它,以减少混乱:
: undefined reference to `FcPatternAddInteger'
<local>/libtk8.5.a(tkUnixRFont.o)(.text+0xe39): In function `TkpGetNativeFont':
: undefined reference to `XftXlfdParse'
<local>/libtk8.5.a(tkUnixRFont.o)(.text+0xe6c): In function `TkpGetNativeFont':
: undefined reference to `FcPatternDestroy'
collect2: ld returned 1 exit status
所以,我想增加更多的图书馆,但我似乎坚持了编译错误。
我最后的Makefile是这样的:
LIBS64 = \
-ltk8.5 \
-ltcl8.5 \
-L/usr/X11R6/lib64 \
-lXft \
-lXss \
-lX11 \
-lICE \
-lSM
我无法弄清楚哪些依赖和需要包括库得到它编译。如果有人可以帮我编译这个,我会非常感激。
我在64位Intel x86机器上使用Linux。您的意思是#include? –
Anand
2011-03-17 18:42:36
哪个Linux发行版?那么,你需要包含标题,当然,但我的意思是你需要首先安装标题。开发包中包含头文件。 – 2011-03-17 18:45:27
我使用%的猫的/ etc/* - 释放 CentOS版本4.6(最终) – Anand 2011-03-17 19:01:21