在.RC文件中将资源文件包含在项目中,而不是.RES文件 [英] Including resource file in a project by .RC file rather than .RES file
问题描述
我有一个glyphs.rc文件,我目前使用命令brcc32 glyphs.rc进行编译。在我的项目文件中,我将有一个声明{$ R Glyphs.res}。
我想通过将其更改为
{$ R Glyphs.rc}
,但不确定语法。当我尝试使用 {$ R Glyphs.rc}
我得到一个错误`
[DCC错误] E2161错误:RLINK32:文件Glyphs.rc中不支持的16位资源。
Delphi 2007是否可以使用此方法?
只需将rc文件通过项目>添加到项目菜单项添加到项目中即可。这从 {$ R'myres.res''myres.rc'} 1298031 / include-resource-file-in-a-project-by-rc-file-than-res-file / 1298086#1298086> TOndrej指向。
I remember reading an article or post somewhere years ago that suggested including a resource file in a project by referencing the .rc file instead of an already compiled .res file so that the resource is built as part of the project's build process.
I have a glyphs.rc file that I currently compile using the command brcc32 glyphs.rc. In my project file I then have the statement {$R Glyphs.res}.
I'd like to simplify this by changing it to something like
{$R Glyphs.rc}
but am unsure of the syntax. When I try using {$R Glyphs.rc}
I get an error `
[DCC Error] E2161 Error: RLINK32: Unsupported 16bit resource in file "Glyphs.rc".
Is this approach possible with Delphi 2007?
Just add the rc file to your project via the "Project > Add to project" menu item. This creates the {$R 'myres.res' 'myres.rc'}
line from the posting that TOndrej links to.
这篇关于在.RC文件中将资源文件包含在项目中,而不是.RES文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!