0
我是GTK的新手,希望能夠編譯我的第一個程序。編譯後,我得到了以下錯誤:GTK2.0已安裝,但編譯時無法找到
[email protected]:~/c_programs/bettingCalc$ gcc -o bettingCalc main.c
main.c:8:21: fatal error: gtk/gtk.h: No such file or directory
#include <gtk/gtk.h>
^
compilation terminated.
典型的解決方案似乎運行命令:
sudo apt-get install libgtk2.0-dev
這我跑了,貌似成功安裝。我在這裏錯過了什麼?
,如果它是在所有相關的,這裏是最後的8條線的安裝過程:
Setting up libxcomposite-dev (1:0.4.4-1) ...
Setting up x11proto-damage-dev (1:1.2.1-2) ...
Setting up libxdamage-dev:amd64 (1:1.1.4-1ubuntu1) ...
Setting up libxml2-utils (2.9.1+dfsg1-3ubuntu4.4) ...
Setting up libgtk2.0-dev (2.24.23-0ubuntu1.1) ...
Setting up libsys-hostname-long-perl (1.4-3) ...
Setting up libmail-sendmail-perl (0.79.16-1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.4) ...
[email protected]:~/c_programs/bettingCalc$
我得到了GTK的配置 – 2014-12-07 01:24:10
嗯 「找不到命令」 ......怎麼樣'''pkg配置--cflags - libs gtk + -2.0'''? – 2014-12-07 01:56:30
產生了 '-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/-I/usr/include/freetype2 -I/usr /include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype randall @ randall-ubuntu:〜$' – 2014-12-07 02:49:34