warning: function declared implicitly错误原因
2016-03-29 22:56
501 查看
这是由于没有声明函数原型造成的。
在a.c中,
void main()
{
.....
delay();
....
}
在b.c中
void delay()
{
}
如果就只是这样的话,就会出现上面的worning的。
解决办法是在b.h中写 extern void delay();然后在a.c中include "b.h"就ok了。
再看程序,发现只包含了DSP281x_Device.h,后来把DSP281x_Examples.h添加进去就消除worning了。
DSP281x_Examples.h中又include“DSP281x_GlobalPrototypes.h”,而这个头文件中声明了全部的外部函数。
在a.c中,
void main()
{
.....
delay();
....
}
在b.c中
void delay()
{
}
如果就只是这样的话,就会出现上面的worning的。
解决办法是在b.h中写 extern void delay();然后在a.c中include "b.h"就ok了。
再看程序,发现只包含了DSP281x_Device.h,后来把DSP281x_Examples.h添加进去就消除worning了。
DSP281x_Examples.h中又include“DSP281x_GlobalPrototypes.h”,而这个头文件中声明了全部的外部函数。
相关文章推荐
- Raspberry安装ssh
- C#扫盲之:==/Equals /ReferenceEquals 异同的总结,相等性你真的知道吗?
- passport.js学习笔记
- asp.net用npoi读取ecxel数据到oracle表
- Visual Studio中的环境变量(以Visual Studio 2013为例)
- android 上传图片到服务器
- React Native for Android 发布独立的安装包
- C语言实现字节流与十六进制字符串的相互转换
- Android:Material系列:ActionBar-->Toolbar
- 机器人工具箱-6自由度机器人建模
- Spring5:@Autowired注解、@Resource注解和@Service注解
- 第一次尝试博客
- java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before
- Qt提取EXE文件的大图标
- 1160 蛇形矩阵
- 我的博客之第一篇
- 笔试and心态
- 安装mysql 5.7.11,初始登录出现:mysql Access denied for user 'root'@'localhost' (using password: YES)
- 模版元编程之——Type Traits
- 修改Eclipse窗口颜色设置