交叉编译arm-GCC编译器不支持wchar_t

horst_hu horst_hu 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
代码如下:
#include <stdio.h>
#include <stdlib.h>



int main(void)
{
wchar_t a = 1;

printf("a =%d\n", a);

return 0;

}
编译
arm-hismall-linux-gcc -I/home/horst/onvif/omate/onvif/src/gsoap -Wl,--gc-sections -Wall -Wextra -Wno-unused-parameter -fsigned-char -fno-omit-frame-pointer -ffunction-sections -fshort-wchar -o test test.c

error:`wchar_t' undeclared (first use in this function)
...全文
评论 5
收藏 已收藏
分享
返回顶部
horst_hu
C语言 70,039 成员 243,237 内容