I thought Delphi would automatically compile resource files when I add them to my program, like
{$R 'resource.rc'}
but the linker returns an error message Error reading file "D:\resource.rc"
. When I look into project options, however, brcc32.exe
is explicitly listed as resource compiler to use:
I know I can invoke the resource compiler from the CLI, but I'd prefer to have resources compiled automatically. How can I do this? I'm using Delphi XE8.
You need to add the resources to the project using the Resources and Images item on the Project menu.
@Joris Grootman I know I'm VERY late to the party, but as another alternative you could set up a "pre-build" event in Delphi (Project Options | Build events | Pre-build events | Commands) to run the resource compiler command before the project builds, and since it's just a quick process you should not notice it slowing down the Delphi build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With