简体   繁体   English

Resource.rc Windres语法错误(Mingw)

[英]Resource.rc Windres Syntax Error (Mingw)

I got a project from MS VS, and at the moment I'm migrating it to compile using gcc for Windows. 我从MS VS得到一个项目,此刻我正在将其迁移为使用Windows的gcc进行编译。

The C code is completely ported, but I'm having a problem using windres to compile the projet resources. C代码已完全移植,但是使用windres编译projet资源时遇到了问题。

I'm having a syntax error, reported by windres, at those single lines: 我在winders的那几行出现语法错误:

CONTROL "Tab1",IDC_FILETAB,"SysTabControl32",TCS_BOTTOM,0,1,336,194 CONTROL“ Tab1”,IDC_FILETAB,“ SysTabControl32”,TCS_BOTTOM,0,1,336,194

CONTROL "Tab1",IDC_KEYS,"SysTabControl32",TCS_BOTTOM,27,111,73,6 CONTROL“ Tab1”,IDC_KEYS,“ SysTabControl32”,TCS_BOTTOM,27,111,73,6

All others use of Control, with similar syntax, works as expected... 其他所有使用Control且语法相似的工具都可以正常使用...

According with http://cygwin.com/cygwin-ug-net/windres.html , the follow syntax is used for CONTROL: 根据http://cygwin.com/cygwin-ug-net/windres.html ,以下语法用于CONTROL:

CONTROL ["name",] id, class, style, x,y,w,h [,exstyle] [data] CONTROL [“名称”,] id,类,样式,x,y,w,h [,exstyle] [数据]

CONTROL ["name",] id, class, style, x,y,w,h, exstyle, helpid [data] CONTROL [“ name”,] id,类,样式,x,y,w,h,exstyle,helpid [数据]

At top of resource.rc I'm including afxres.h,winuser.h and windows.h . 在resource.rc的顶部,我包括afxres.h,winuser.h和windows.h。

Can any one give me a help? 有人可以帮我吗? I don't have a clue about what to do.... 我不知道该怎么办...。

BTW, if I comment those lines, all ends with no errors, but the executable cannot works properly. 顺便说一句,如果我注释这些行,所有结尾都没有错误,但是可执行文件无法正常工作。

Thanks 谢谢

Edit: After more search on the internet.. I found that windres already had many problems with syntax accepted on windows resource compiler, mainly because some classes aren't visible for windres. 编辑:在Internet上进行了更多搜索之后。我发现windres已经在Windows资源编译器上接受了很多语法问题,这主要是因为windes看不到某些类。 So if any one know an alternative classes/id, or where it are defined to include, I can workaround it. 因此,如果有人知道替代类/ id,或将其定义为包含在何处,则可以解决该问题。

您可能一直在复制代码,只是在textviewer中打开代码并将其格式更改为纯文本,或者编辑并替换字符“”等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM