/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory


cc -DDEBUG -mtune=core2 -O2 \
-onvideo nvideo.c \
-I/usr/include/atk-1.0 \
-I/usr/include/cairo \
-I/usr/include/gdk-pixbuf-2.0 \
-I/usr/include/glib-2.0 \
-I/usr/include/gtk-3.0 \
-I/usr/include/pango-1.0 \
-I/usr/include/libxml2 \
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
-lpthread \
-lgtk-3 -lgobject-2.0 -lgthread-2.0 \
-lxml2
In file included from /usr/include/glib-2.0/glib/galloca.h:34:0,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
from /usr/include/gtk-3.0/gdk/gdk.h:32,
from /usr/include/gtk-3.0/gtk/gtk.h:32,
from nvideo.c:11:
/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory
compilation terminated.
make: *** [edit] Error 1

因為之前已經安裝了gtk開發包,所以理論上不應該出現找不到.h文件的問題。最后發現問題出在-I/usr/lib/x86_64-linux-gnu/glib-2.0/include參數上。因為之前使用的64位,所以這個位置沒有問題,但是現在我用的是32位系統,所以導致這個路徑指錯了,增加-I/usr/lib/i386-linux-gnu/glib-2.0/include 即可。

實際使用應該使用pkg-config來配置這個路徑的,但是我想手工去完成這個事情,所以導致了這個問題。還弄得滿世界去找是不是少裝了哪個開發包~~:)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM