- 论坛徽章:
- 0
|
代码情况比较复杂,不好说...
举例说吧,有三个文件 a.c a.h b.c,a.h中定义一个结构体,在另外两个文件都会用到,所以两个文件都include"a.h",
a.h还声明了一些a.c中的函数,编译的时候就出现下面错误,这些错误就是在a.h里面的函数声明处, a.h中的结构体用了
typedef ,不知道这个有没有影响,因为看了一些文章,但是也没完全搞明白... 如果有人遇到过这个问题就最好了~~
In file included from detect.h:5,
from detect.c:10:
decode.h:38: error: expected declaration specifiers or ‘...’ before ‘u_char’
decode.h:39: error: expected declaration specifiers or ‘...’ before ‘u_char’
decode.h:40: error: expected declaration specifiers or ‘...’ before ‘u_char’
decode.h:41: error: expected declaration specifiers or ‘...’ before ‘u_char’
decode.h:42: error: expected declaration specifiers or ‘...’ before ‘u_char’
decode.h:43: error: expected declaration specifiers or ‘...’ before ‘u_char’
decode.h:44: error: expected declaration specifiers or ‘...’ before ‘u_char’
decode.h:45: error: expected declaration specifiers or ‘...’ before ‘u_cha |
|