Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GCC错误:应为‘;)’;之前<;功能协议计数器>;参数_C_Gcc - Fatal编程技术网

GCC错误:应为‘;)’;之前<;功能协议计数器>;参数

GCC错误:应为‘;)’;之前<;功能协议计数器>;参数,c,gcc,C,Gcc,在头文件中 外部无效跟踪通信(通信块mdbMessage) 在“mdbMessage”之前给出error:expected'), 我确信communicationBlock\u t在范围内(并且相信传递指针会更有效) 如果我将communicationBlock\t的声明复制到extern违规行之前,则错误为 error: conflicting types for ‘communicationBlock_t’ note: previous declaration of ‘communica

在头文件中

外部无效跟踪通信(通信块mdbMessage)

在“mdbMessage”之前给出
error:expected'),

我确信
communicationBlock\u t
在范围内(并且相信传递指针会更有效)

如果我将
communicationBlock\t
的声明复制到
extern
违规行之前,则错误为

error: conflicting types for ‘communicationBlock_t’  
note: previous declaration of ‘communicationBlock_t’ was here
这似乎意味着违规行可以访问
communicationBlock\t

我想我忽略了一些琐碎和明显的事情,但我已经编码了一整晚,不能再直接思考了

我做错了什么?谢谢,一百万


更新:我猜这是一个包含文件的混乱

typedef struct
{
  communicationMessage_t message;
  uint8_t                length;
#ifdef TESTING
   char                   commandName[32];    // for testing porpoises 
   DoRunTimeChecks        runTimeCheckCallback;
#endif      
} communicationBlock_t;

在我看来,您正在使用变量作为类型名。
通信阻塞的声明是什么样子的?

对不起,各位。正如我所怀疑的那样,《包含文件》(include files)

中有一个致命的拥抱,那就是确保
Trace\u通信
mdbMessage
不在
\define
d或
typedef
d任何地方。+1它们不在这里,但感谢您的提示“以前的‘通信阻塞’声明在这里”指向正确的地方,这是你期望的声明吗?如果在
Trace\u Communication()
的原型中将
communicationBlock\u t
替换为
int
,会发生什么情况?