C语言 IAR EWARM中的奇怪错误“错误[Pe147]:声明与“__interwork __softfp”不兼容

wyyhbhjk  于 2023-03-28  发布在  其他
关注(0)|答案(1)|浏览(260)

我发现了一个超出我知识范围的错误:

Error[Pe147]: declaration is incompatible with "__interwork __softfp char *Get_Language_String(enum Lang_Index, enum String_Index)" (declared at line 26 of "E:\Freescale\Freescale_MQX_4_0\demo\ E:\Freescale\Freescale_MQX_4_0\demo\DialogD13_Demo_v5\Strings.c 79

DialogD13_Demo_v5\Strings.h”)
我的代码中有这样的:

strings.h:
extern char *Get_Language_String(enum Lang_Index Lang_Ind, enum String_Index Str_Ind);

strings.c:
char *Get_Language_String(enum Lang_Index Lang_Ind, enum String_Index Str_Ind)
{
  return languages[Lang_Ind][Str_Ind];
}

怎么了?
先谢谢你,
你好,布尔。

6ss1mwsb

6ss1mwsb1#

谢谢你的回应…
是定义的顺序导致了这个错误。
strngs.h中的extern子句位于枚举的定义之前...
致上,
布列克

相关问题