找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開(kāi)始

搜索
查看: 16278|回復(fù): 1
打印 上一主題 下一主題
收起左側(cè)

error:#8: missing closing quote 問(wèn)題解決

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:104126 發(fā)表于 2016-1-23 02:44 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
MDK5無(wú)法編譯漢子編碼問(wèn)題
MDK5.17編譯EMWIN 提示錯(cuò)誤,具體現(xiàn)象是在包含漢子顯示的部分會(huì)出現(xiàn)這個(gè)BUG.
類(lèi)似這種語(yǔ)句
    { BUTTON_CreateIndirect,   "安安安",          GUI_ID_BUTTON0,        350,20,420,150,0,0},
    { TEXT_CreateIndirect,     "安安安安安",      GUI_ID_TEXT0,          5, 10, 300, 33, 0,0},
    { TEXT_CreateIndirect,     "安安安安子",      GUI_ID_TEXT1,          5, 40,250, 50, 0,0},
但是原來(lái)mdk4.74的工程都無(wú)法完成編譯,提示很多錯(cuò)誤。都是有中文字符的地方。另一個(gè)論壇上也提到了這個(gè)問(wèn)題,而且貌似無(wú)解。
解決方案:用notepad++把文件編碼轉(zhuǎn)換為UTF-8編碼模式。之前打開(kāi)顯示的編碼模式是UTF-8無(wú)BOM格式,那種格式在MDK5里面是無(wú)法正常解析的,MDK4確可以正確識(shí)別,大家在用MDK5.1遇到這個(gè)錯(cuò)誤之后按照這個(gè)方法解決即可,具體原理不詳。
編譯器提示的錯(cuò)誤匯總:
applications\MainTask.c(45): error: #8: missing closing quote
applications\MainTask.c(45): error:  #8:missing closing quote
      {BUTTON_CreateIndirect,   "瀹?瀹?瀹?",          GUI_ID_BUTTON0,        350,20,420,150,0,0},
applications\MainTask.c(46): error:  #253:expected a ","
      {TEXT_CreateIndirect,     "瀹?瀹?瀹?瀹?瀹?",      GUI_ID_TEXT0,          5, 10, 300, 33, 0,0},
applications\MainTask.c(46): error:  #8:missing closing quote
      {TEXT_CreateIndirect,     "瀹?瀹?瀹?瀹?瀹?",      GUI_ID_TEXT0,          5, 10, 300, 33, 0,0},
applications\MainTask.c(47): error:  #8:missing closing quote
      {TEXT_CreateIndirect,     "瀹?瀹?瀹?瀹?瀛?",      GUI_ID_TEXT1,          5, 40,250, 50, 0,0},
applications\MainTask.c(48): error:  #8:missing closing quote
      {TEXT_CreateIndirect,     "瀹?瀹?瀹?",          GUI_ID_TEXT2,          5, 100,360, 90, 0,0},
applications\MainTask.c(49): error:  #8:missing closing quote
      {TEXT_CreateIndirect,     "瀵?",             GUI_ID_TEXT3,          5, 220,144, 144, 0,0},
applications\MainTask.c(50): error:  #8:missing closing quote
      {TEXT_CreateIndirect,     "瀵?",             GUI_ID_TEXT4,          205, 230,144, 144, 0,0},
error:  #8: missing closing quote
      {TEXT_CreateIndirect,     "瀵?",             GUI_ID_TEXT5,          405, 230,144, 144, 0,0},
error:  #8: missing closing quote
error:  #67: expected a "}"
error:  #67: expected a "}"
error:  #757: function "WM_GetDialogItem" isnot a type name
error:  #18: expected a ")"
error:  #79: expected a type specifier
error:  #147: declaration is incompatible with"void TEXT_SetFont(TEXT_Handle, const GUI_FONT *)" (declared atline 144 of "STemWin\inc\TEXT.h")
error:  #40: expected an identifier
error:  #757: function "WM_GetDialogItem" isnot a type name
error:  #18: expected a ")"
error:  #79: expected a type specifier
error:  #147: declaration is incompatible with"void TEXT_SetTextColor(TEXT_Handle, GUI_COLOR)" (declared at line147 of "STemWin\inc\TEXT.h")
error:  #40: expected an identifier
error:  #757: function "WM_GetDialogItem" isnot a type name
error:  #18: expected a ")"
error:  #79: expected a type specifier
error:  #40: expected an identifier
error:  #757: function "WM_GetDialogItem" isnot a type name
error:  #18: expected a ")"
error:  #79: expected a type specifier

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:948433 發(fā)表于 2021-7-7 14:18 | 只看該作者
https://blog.csdn.net/syrchina/article/details/79916542   看網(wǎng)上這樣也可以
回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表