Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1860871
  • 博文数量: 211
  • 博客积分: 464
  • 博客等级: 下士
  • 技术积分: 3794
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-24 18:25
个人简介

阿弥陀佛

文章分类

全部博文(211)

文章存档

2020年(2)

2019年(3)

2018年(5)

2017年(6)

2016年(10)

2015年(9)

2014年(73)

2013年(90)

2012年(13)

分类: LINUX

2013-07-22 10:06:15

avl.c:882: error: conflicting types for ‘avl_is_empty’
avl.h:251: note: previous declaration of ‘avl_is_empty’ was here
出现上面的错误说明声明和实现的函数名称不对应,比如
extern int f(char *p);   
而实现是 int f(char p){
}
这样导致的不一致会产生上面的错误。

我之前还担心如果利用Makefile去编译所有的文件然后生成一个可执行文件,如果多个文件包含main函数,那程序该如何做的时候,我发现这样make的时候会报错的。
/root/largefs/src/lfs_main.c:116: multiple definition of `main'
lfs_format.o:/root/largefs/src/lfs_format.c:103: first defined here
lfs_ops.o: In function `getphymemsize':
/root/largefs/src/lfs.h:29: multiple definition of `getphymemsize'
阅读(1899) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~