简体   繁体   English

编译/构建时,* .rc中的文件不会刷新

[英]files from *.rc are not refreshed when compiling/building

I have a file that needs to be refreshed every days, linked into a rc file this way : 我有一个文件需要每天刷新,这样链接到一个rc文件:

docs.rc

  file RCDATA "C:\folder\myfile.ext"

I understand that it refreshes the resources itself if changes are made in my *.rc file... only. 我知道如果只在我的* .rc文件中进行更改,它会刷新资源本身。 The only way i found to be sure that the resource is refreshed is removing it, compiling, setting it back and compiling again. 我发现确保资源刷新的唯一方法是删除它,编译,重新设置并再次编译。

Any piece of advice, pre-compiling command or anything better ? 任何建议,预编译命令或更好的东西?

Thanks ! 谢谢 !

Using Delphi XE2 Enterprise. 使用Delphi XE2 Enterprise。

[edit] [编辑]

of course i forgot this line from project code : 当然我从项目代码中忘记了这一行:

{$R 'docs.res' 'docs.rc'}

Open your project. 打开你的项目。 Go to Project Menu then select Resources and Images item. 转到“ Project菜单”,然后选择“ Resources and Images项。 Then add your resources to the list instead of RC file. 然后将您的资源添加到列表而不是RC文件。

It will solve your problem. 它会解决你的问题。

您可以使用预构建事件并使用brcc32.exe“手动”编译rc文件

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

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