fatal error: glib.h: No such file or directory
在学习BLE bluez的时候,做了一个测试程序,看到gatttool.c下面有一个glib解析命令行的功能,想移植到自己的程序接口中,但是添加了#include <glib.h>后,出现了fatal error: glib.h: No such file or directory错误。经过网上查找答案,询问同事,找到了解决方法:在Makefile中添加glib库和头文件。
方法如下
1.安装glib库:
apt-get install libglib2.0-dev
2.(Makefile中):
LINKFLAGS += -lglib-2.0
INCL_PATH += -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include/
.SUFFIXES:.c.o.h
$(BIN):$(OBJECTS)
$(CC) $(CMPOPT) $(BIN) $(OBJECTS) $(LINKFLAGS)
%.o:%.c
$(CC) -c $(INCL_PATH) $(CFLAGS) $< $(CMPOPT) $@
fatal error: glib.h: No such file or directory的更多相关文章
- /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 ...
- plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
装一台新服务器环境的时候,装uwsgi报错: plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or di ...
- [lua]luasocket.c:20:17: fatal error: lua.h: No such file or directory
安装luasocket的时候出现了如下的错误 问题 $ tar xzf luasocket-2.0.2.tar.gz $ cd luasocket-2.0.2 $ $ make cd src; mak ...
- Solve fatal error: helper_math.h: No such file or directory
When the 'fatal error: helper_math.h: No such file or directory' occurs, it means the 'helper_math.h ...
- qingstor python-sdk 安装错误 src/MD2.c:31:20: fatal error: Python.h: No such file or directory
ubuntu安装python qingstor-sdk, src/MD2.c:31:20: fatal error: Python.h: No such file or directory compi ...
- Ubuntu下 fatal error: Python.h: No such file or directory 解决方法
参考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such file or ...
- tesseract编译错误:fatal error: allheaders.h: No such file or directory
错误描述: globaloc.cpp::: fatal error: allheaders.h: No such file or directory #include "allheaders ...
- 解决 Boost安装:fatal error: bzlib.h: No such file or directory 问题
参考: How to install all the boost development libraries? 解决 Boost安装:fatal error: bzlib.h: No such fil ...
- caffe编译问题-src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory compilation terminated.
错误描述 src/caffe/net.:: fatal error: hdf5.h: No such : recipe 操作过程 step1: 在Makefile.config文件更改INCLUDE_ ...
随机推荐
- ZYNQ PS端IIC接口使用-笔记
ZYNQ7000系列FPGA的PS自带两个IIC接口,接口PIN IO可扩展为EMIO形式即将IO约束到PL端符合电平标准的IO(BANK12.BANK13.BANK34.BANK35): SDK中需 ...
- pillow 压缩和放大图片
记住这个 resize()方法 from PIL import Image img=Image.open("test.png") x,y=img.size print(x,y) ...
- java动态代理——字段和方法字节码的基础结构及Proxy源码分析三
前文地址:https://www.cnblogs.com/tera/p/13280547.html 本系列文章主要是博主在学习spring aop的过程中了解到其使用了java动态代理,本着究根问底的 ...
- centos7安装单机环境redis3.2
本次安装的系统版本如下: [root@zhangqinglei ~]# cat /etc/redhat-releaseCentOS Linux release 7.5.1804 (Core) [roo ...
- Python 字典(Dictionary) type()方法
Python 字典(Dictionary) type()方法 描述 Python 字典(Dictionary) type() 函数返回输入的变量类型,如果变量是字典就返回字典类型.高佣联盟 www.c ...
- PHP cal_to_jd() 函数
------------恢复内容开始------------ 实例 把 2007 年 6 月 20 日(格利高里历法)转换为儒略日计数: <?php$d=cal_to_jd(CAL_GREGOR ...
- Linux服务器配置SSH免密登录
SSH为Secure Shell的缩写,由IETF的网络小组(Network Working Group)所制定:SSH为建立在应用层基础上的安全协议.SSH是目前较可靠,专为远程登录会话和其他网络服 ...
- 数据结构中的树(二叉树、二叉搜索树、AVL树)
数据结构动图展示网站 树的概念 树(英语:tree)是一种抽象数据类型(ADT)或是实作这种抽象数据类型的数据结构,用来模拟具有树状结构性质的数据集合.它是由n(n>=1)个有限节点组成一个具有 ...
- JAVA程序设计环境
JDK ,Java Development Kit(Java开发工具包) JRE ,Java Runtime Environment(Java运行时环境) SE ,Standard Edition ...
- Json字符串与QVariantList 对象相互转换
在Qt中QVariantList 使用起来很方便,如果涉及到数据的传输,需要将QVariantList 数据转换为JsonArray字符串,这个转换Qt已经实现好了,只需要调用接口就可以完成转换,代码 ...