0
votes

If you add resources to your project, Delphi will create a Resource.rc file. The Delphi IDE will also automatically compile it into the .dres file. This .rc file is always built with double backslashes in path names.

Using a VCS I find it stupid to check in the .dres file, as my build system can take care of building it from the .rc file. If the resource contains images, the size can be quite big. But to the best of my knowledge this is not done by the command line compiler.

So I have to us either BRCC32.exe or RC.exe before compiling the exe. And here is the problem:

  1. BRCC32 doesn't like the double backslashes in the Resource.rc file.

  2. RC like double backslashes, but when linking I get "Unsupported 16bit resource in file".

The brute force method that I have used for some time, is to "clean" the backslashes before checking in the .rc file to VCS and use BRCC32. Gets boring :-(

Is there a better way?

1
The better way is not to use the IDE for this task and take back control of your build processDavid Heffernan
@DavidHeffernan You mean not use the IDE "Resources and Images..." menu at all?Anders Gustavsson
Correct, it's more trouble that it is worth.David Heffernan

1 Answers

0
votes

My own solution in the end, to avoid rewriting many projects, was to add a filterfunction to the build process, that basically exchanged all double \ for \ thus making BCC32.exe happy.