error: implicit declaration of function ‘read‘ [-Werror,-Wimplicit-function-declaration]
具体错误:
builds/unix/ftsystem.c:325:22: error: implicit declaration of function 'read'[-Werror,-Wimplicit-function-declaration]read_count = read( file,^
builds/unix/ftsystem.c:325:22: note: did you mean 'fread'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:158:9: note: 'fread' declared here
size_t fread(void * __restrict __ptr, size_t __size, size_t __nitems, ...^
builds/unix/ftsystem.c:346:5: error: implicit declaration of function 'close'[-Werror,-Wimplicit-function-declaration]close( file );
解决办法:
说到底就是没有包含相应的头文件:
#include <fcntl.h>
#include <unistd.h>
error: implicit declaration of function ‘read‘ [-Werror,-Wimplicit-function-declaration]相关推荐
- 解决gcc报错:error: implicit declaration of function ‘inet_addr’ [-Werror=implicit-function-declaration]
此文首发于我的个人博客:解决gcc报错 error implicit declaration of function 'inet_addr' [-Werror=implicit-function-de ...
- 【igb驱动交叉编译】igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’
最近igb编译驱动发现了这个问题: zacha@Superman:~/igb/igb-5.7.2/src$ make #@+ echo "*** The target kernel has ...
- 报错解决:error: this statement may fall through [-Werror=implicit-fallthrough=]
下午在编译 grpc时报错如下: utilities/blob_db/blob_log_reader.cc:74:18: error: this statement may fall through ...
- nginx报错:src/core/ngx_murmurhash.c:39:11: error: this statement may fall through [-Werror=implicit-fa
报错: make -f objs/Makefile install make[1]: Entering directory '/usr/local/nginx/nginx-1.7.7' cc -c - ...
- Error in bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt) : function ‘Rcpp_preci
Error in bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt) : function 'Rcpp_preci ...
- eltwise_layer.cpp:170: error: (-215:Assertion failed) inputs.size() = 2 in function 'cv::dnn::Eltwi
eltwise_layer.cpp:170: error: (-215:Assertion failed) inputs.size() >= 2 in function 'cv::dnn::El ...
- error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
编译一段程序时,出现连接器错误: error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTS ...
- warning: #231-D: declaration is not visible outside of function
warning: #231-D: declaration is not visible outside of function 导致出现这个警告的情况有两个: 在头文件中声明函数时.引用了头文件不知道 ...
- bar.bind.bind_JavaScript中的function.prototype.bind和function.prototype.length解释
bar.bind.bind 功能绑定 (Function Bind) bind is a method on the prototype of all functions in JavaScript. ...
- $(window).load(function() {})和$(document).ready(function(){})的区别
在我以前的开发中,一般用到javascript,我都是采用jquery的模式,也就是大多数时候,第一行写的是: $(document).ready(function(){ ... }); 这个时候,不 ...
最新文章
- JS对象转URL参数
- 了解下RDF 容器元素
- tomcat8源码分析-Connector初始化
- 如何下载python模块_Python第三方库(模块)下载和安装(使用pip命令)
- 闪电shader_【Shader案例】怎样做出自然的闪电
- 进程的创建-fork(python版)
- windows下cocos2d-x android打包
- 程序猿生存定律--表达背后的力量(1)
- 记在thinkPHP中一个创建模型的小错误
- html 图片 滤镜,用Css给你的图片加上Instagram滤镜
- java实现cas单点登录_CAS单点登录实现步骤
- Smobiler中Poplist控件的用法
- es浏览器连接电脑找不到服务器,es文件浏览器,详细教您es文件浏览器怎么连接电脑...
- 结构体数组和二维数组初始化和拷贝
- java中实现热门搜索的逻辑_Java编程的逻辑 (45) - 神奇的堆
- 人人都在谈的 “数据驱动” 到底是什么?你确认自己做的是数据驱动吗?
- 记事本 批量新建文件夹
- Python手绘图案出现MemoryError错误、缺少numpy、PIL包的问题
- linux c字符串用0补位,Linux中10个你不知道的命令补齐技巧
- c++#学生平均成绩,学号排序
热门文章
- 卸载所有supervisor残留_拯救C盘!这个良心的卸载工具还是免费的?!
- 山西工商学院计算机科学与技术专业怎么样,山西工商学院计算机科学与技术专业2016年在山西理科高考录取最低分数线...
- java为什么序列化_什么是Java序列化、为什么要序列化、JAVA序列化有哪些方式(性能由低至高)...
- vue检测是不是360浏览器兼容模式_Vue项目兼容IE11
- JAVA桌面小程序视频_「小程序JAVA实战」小程序视频组件与api介绍(51)
- 二进制数组操作的数组维度必须匹配_Testbench编写指南(2)文件的读写操作
- matplotlib中subplot的各参数的作用
- JS 表单submit() 提交无效的问题
- cygwin+hadoop+eclipse (三) 运行wordcount实例
- ASP.NET C#读写Cookie的方法!