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