Compiler can’t find “wchar.h” and “wctype.h” includes that don’t exist in “C:\NXP\MCUXpressoIDE_11.8.0_1165\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047\tools\redlib\include” folder – the one where all other library headers are located.
These two header files do exist in “C:\NXP\MCUXpressoIDE_11.8.0_1165\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047\tools\arm-none-eabi\include” folder though.
So, what is the difference between these two folders with header files and where in project settings do I specify which one to use? Can I use the latter when compiling for LPC1788 with Redlib?
Thank you,
Eugene
已解决! 转到解答。
Hi @Eugene723 ,
Redlib does not support wide characters, you have to select a library which supports it, for example newlib:
I wrote about different library options here: https://mcuoneclipse.com/2023/01/28/which-embedded-gcc-standard-library-newlib-newlib-nano/
I hope this helps,
Erich
Hello @Eugene723
"Can I use the latter when compiling for LPC1788 with Redlib?"
->>Which lib does your old project used?
You can also send your project to me, I help to check on my side.
BR
Alice
Hi Alice,
The old project used expensive commercial toolchain, so we decided to port it to MCUXpresso.
Some .c files from old project contain the following statements:
#include <wctype.h>
#include <wchar.h>
so compiler errors:
fatal error: wctype.h: No such file or directory
although there are those files, but in different folder. Function "wmemcmp" is used in this way:
int diff = wmemcmp(a, b, a_count);
where "a" and "b" declared as "wchar_t *".
Declaration "wchar_t" comes from header "stdlib.h" located in "C:\NXP\MCUXpressoIDE_11.8.0_1165\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047\tools\redlib\include" folder, but neither "wctype.h" nor "wchar.h" reside in that folder. Why?
Thank you,
Eugene
Hi @Eugene723 ,
Redlib does not support wide characters, you have to select a library which supports it, for example newlib:
I wrote about different library options here: https://mcuoneclipse.com/2023/01/28/which-embedded-gcc-standard-library-newlib-newlib-nano/
I hope this helps,
Erich