- 論壇徽章:
- 0
|
代碼情況比較復(fù)雜,不好說...
舉例說吧,有三個(gè)文件 a.c a.h b.c,a.h中定義一個(gè)結(jié)構(gòu)體,在另外兩個(gè)文件都會(huì)用到,所以兩個(gè)文件都include"a.h",
a.h還聲明了一些a.c中的函數(shù),編譯的時(shí)候就出現(xiàn)下面錯(cuò)誤,這些錯(cuò)誤就是在a.h里面的函數(shù)聲明處, a.h中的結(jié)構(gòu)體用了
typedef ,不知道這個(gè)有沒有影響,因?yàn)榭戳艘恍┪恼,但是也沒完全搞明白... 如果有人遇到過這個(gè)問題就最好了~~
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 |
|