- 论坛徽章:
- 0
|
本帖最后由 79hy 于 2010-12-09 10:37 编辑
我打开了检查原型声明的选项,总是报错,不知怎么解决? 望高人指点
a.h- #ifndef A_H
- #define A_H
- int abc();
- #endif
复制代码 a.c- #include "a.h"
- int abc()
- {
- return 0;
- }
复制代码 b.c- #include "a.h"
- int main()
- {
- abc();
- return 0;
- }
复制代码 警告- gcc -Wall -Wmissing-prototypes a.c b.c
- a.c:4: warning: no previous prototype for 'abc'
复制代码 gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
谢谢 |
|