LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 5305|回复: 2

expected specifier-qualifier-list before...

[复制链接]
发表于 2006-12-15 10:30:25 | 显示全部楼层 |阅读模式
遇到了一个特别奇怪的问题,在程序里添加了一个结构体
  1. struct invite_mutex{
  2.         pthread_mutex_t mutex;
  3.         char no[MAX_NO];
  4.         struct channel *chan;
  5. };
复制代码
但是无论怎样,编译的时候都报错:
  1. res_features.c:927: error: expected specifier-qualifier-list before use_ast_mutex_t_instead_of_pthread_mutex_t
  2. res_features.c: In function accept_invite:
  3. res_features.c:942: error: struct invite_mutex has no member named chan
  4. res_features.c:946: error: struct invite_mutex has no member named mutex
  5. res_features.c:952: error: struct invite_mutex has no member named no
  6. res_features.c:954: error: struct invite_mutex has no member named mutex
  7. res_features.c: In function builtin_invite :
  8. res_features.c:971: error: struct invite_mutex has no member named mutex
  9. res_features.c:971: error: expected expression before { token
  10. res_features.c:984: error: struct invite_mutex has no member named mutex
  11. res_features.c:985: error: struct invite_mutex has no member named chan
  12. make[1]: *** [res_features.o] Error 1
复制代码

感觉问题很奇怪, 从来没有遇到过, google了一下, 有说是内核头文件的bug, 但是就是没有找到解决的办法

高手指点下,谢谢
发表于 2006-12-15 17:12:01 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2008-11-20 16:39:56 | 显示全部楼层
今天遇到了类似的情况,
发现是把结构定义放在了#include之前引起的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表