为了找到解决方案,我在互联网上搜索。我添加了命令的输出
pkg-config --cflags glib-2.0
那是-I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include
生成文件如下
GCC = -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -lglib-2.0
but still an error glib.h: No such file or directory
这是我的制作文件
ROOTDIR = $(CURDIR)
#-I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include include makefiles/platforms.mk
ZLIBDIRS = zlibrary/core zlibrary/text zlibrary/ui APPDIRS = fbreader GCC = -I/usr/include/glib-2.0
-I/usr/lib/i386-linux-gnu/glib-2.0/include -lglib-2.0
#gcc -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include
#gcc pkg-config --cflags --libs glib-2.0 all: @for dir in $(ZLIBDIRS) $(APPDIRS); do \ if [ -d $$dir ]; then \ cd $$dir; \ if ! $(MAKE); then \
exit 1; \ fi; \ cd $(ROOTDIR); \ fi; \ done;
install: all do_install
do_install: @for dir in $(ZLIBDIRS) $(APPDIRS); do \ if [ -d $$dir ]; then \ cd $$dir; make $@; cd $(ROOTDIR); \ fi; \ done
do_install_dev: @for dir in $(ZLIBDIRS); do \ if [ -d $$dir ]; then \ cd $$dir; make $@; cd $(ROOTDIR); \ fi; \ done
clean: @for dir in $(ZLIBDIRS) $(APPDIRS); do \ if [ -d $$dir ]; then \ cd $$dir; make $@; cd $(ROOTDIR); \ fi; \ done
distclean: clean @rm -rvf *.tgz *.tar.gz *.ipk *.deb *.prc *.exe
*.log *.dsc *.changes *.rpm @rm -rf tmp packages packages-nonGPL fbreader-*
请帮我摆脱这种情况。提前致谢。
答案1
您可能只需要包含以下内容的 -dev 包glib.h
:libglib2.0-dev
sudo apt-get install libglib2.0-dev
http://packages.ubuntu.com和它的搜索包裹内容当您只知道头文件名时,表单可以帮助找到此类开发包。