wchar.h and MQX IO incompatibility

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

wchar.h and MQX IO incompatibility

跳至解决方案
1,408 次查看
jessg_
Contributor II

Hi all,

Working with uVision IDE, I want to use the standard library "wchar.h" provided by Keil because I need functions to process wide character strings in my project.

I can not include "wchar.h" and MQX file "fio.h" in the same project because it causes compiler errors like this:

In "fio.h", it has been defined:

typedef MQX_FILE FILE

But in "wchar.h":

      typedef struct __FILE FILE

Both "fio.h" and "wchar.h" are necessary... I know I could edit "wchar.h" file, but I am not sure of modifying standard libraries is the best way...

So, any ideas? What would you do if you were me?

标记 (4)
0 项奖励
回复
1 解答
1,076 次查看
c0170
Senior Contributor III

Hello Jesicca Garcia,

I believe there are more errors which you have not included in your post. There might be a way, if possible to disable "features" which MQX redeclare, like FILE redeclaration : Use macro __ARM_WCHAR_NO_IO to disable FILE redeclaration and I/O function prototypes.

Regards,

MartinK

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,077 次查看
c0170
Senior Contributor III

Hello Jesicca Garcia,

I believe there are more errors which you have not included in your post. There might be a way, if possible to disable "features" which MQX redeclare, like FILE redeclaration : Use macro __ARM_WCHAR_NO_IO to disable FILE redeclaration and I/O function prototypes.

Regards,

MartinK

0 项奖励
回复