Keil 编译IEC61131-3库,头文件,大量出现以下错误;
cast to type ? is not allowed
compiling resource1.c...
..\PLC\rts\matiec\lib\C\iec_std_functions.h(192): error: #119: cast to type "TIME" is not allowed
__ANY_BIT(__iec_)
..\PLC\rts\matiec\lib\C\iec_std_functions.h(192): error: #119: cast to type "TIME" is not allowed
__ANY_BIT(__iec_)
..\PLC\rts\matiec\lib\C\iec_std_functions.h(196): error: #119: cast to type "DATE" is not allowed
__ANY_BIT(__to_anydate_)
..\PLC\rts\matiec\lib\C\iec_std_functions.h(196): error: #119: cast to type "TOD" is not allowed
__ANY_BIT(__to_anydate_)
..\PLC\rts\matiec\lib\C\iec_std_functions.h(196): error: #119: cast to type "DT" is not allowed
__ANY_BIT(__to_anydate_)
..\PLC\rts\matiec\lib\C\iec_std_functions.h(196): error: #119: cast to type "DATE" is not allowed
通过如下方式解决:
--gnu -Dlittle_endian
C99 Mode