野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9149|回复: 1

H743开发板-挑战者V2例程编译问题

[复制链接]
发表于 2022-3-14 21:17:03 | 显示全部楼层 |阅读模式
我用的是MDK5.29,打开开发板例程,编译出现报错,希望帮忙解决,谢谢!
看起来是中文字符串,WCHAR初始化引起的问题:
const WCHAR Week_List[][4] = {{L"星期一"}, {L"星期二"}, {L"星期三"}, {L"星期四"}, {L"星期五"}, {L"星期六"}, {L"星期日"}};
Build started: Project: Fire_H7
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Fire_H7'
compiling GUI_CLOCK_DIALOG.c...
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c(29): error:  #144: a value of type "unsigned short [7]" cannot be used to initialize an entity of type "const WCHAR [4]"
  const WCHAR Week_List[][4] = {{L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}};
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c(29): error:  #144: a value of type "unsigned short [7]" cannot be used to initialize an entity of type "const WCHAR [4]"
  const WCHAR Week_List[][4] = {{L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}};
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c(29): error:  #144: a value of type "unsigned short [7]" cannot be used to initialize an entity of type "const WCHAR [4]"
  const WCHAR Week_List[][4] = {{L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}};
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c(29): error:  #144: a value of type "unsigned short [7]" cannot be used to initialize an entity of type "const WCHAR [4]"
  const WCHAR Week_List[][4] = {{L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}};
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c(29): error:  #144: a value of type "unsigned short [7]" cannot be used to initialize an entity of type "const WCHAR [4]"
  const WCHAR Week_List[][4] = {{L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}};
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c(29): error:  #144: a value of type "unsigned short [7]" cannot be used to initialize an entity of type "const WCHAR [4]"
  const WCHAR Week_List[][4] = {{L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}};
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c(29): error:  #144: a value of type "unsigned short [7]" cannot be used to initialize an entity of type "const WCHAR [4]"
  const WCHAR Week_List[][4] = {{L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}, {L"??????"}};
..\..\User\app\Board_App\clock\GUI_CLOCK_DIALOG.c: 0 warnings, 7 errors
"..\..\Output\Fire_H7.axf" - 7 Error(s), 0 Warning(s).
err144.PNG

回复

使用道具 举报

 楼主| 发表于 2022-5-21 11:33:24 | 显示全部楼层
有人知道这个问题咋解决吗?谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-11-24 01:03 , Processed in 0.037396 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表