编译程序的时候老是出现以下错误,
[root@localhost process]# gcc daemon.c -o daemon
daemon.c: In function ‘init_daemon’:
daemon.c:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
daemon.c:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
daemon.c:56: error: expected ‘{’ at end of input
网上查了很久也没有找到解决方法,看了N遍,原来是函数声明时没有加 ; !!!!!!!!!!!!!!
写程序时要记得加 ; 号啊!!!!!!!!!!!!
阅读(7610) | 评论(0) | 转发(0) |