I am getting this rather confusing compiler warning:
[DCC Warning] W1056 Warning: Duplicate resource: Type 14 (ICON GROUP), ID MAINICON; File C:\dev\dispense\trunk\dev\source\mountaintop\dispense\MtnDispense.res resource kept; file C:\dev\dispense\trunk\dev\source\mountaintop\dispense\MtnDispense.res resource discarded.
In case the formatting isn't clear; the two paths it mentions are identical.
The application doesn't have any entries under Project->Resources
The application has a custom icon, defined under Project->Options->Application->Icon.
Does this warning mean anything? And how can I remove it?
It means the resource file is being imported more than once. You should only have one
{$R *.res}
in your dpr file. To fix the error, remove the extra ones.
I reproduced your problem:
program ProjectName;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Remove the second compiler directive. Or there is a {$R ProjectName.res}
somewhere in another source file.
In my case the problem was like this:
Program xyz;
uses
FastMM4,
Windows,
SysUtils,
Forms,
cIO,
FormManager in 'FormManager.pas' {FrmManager} {$R *.RES}; <----- HERE
{$R *.RES}
The IDE corrupted the DPR file and accidentally added an extra $R directive in the 'uses'. Actually, this is not a "happen once" case. I see this from time to time.
This explains your:
No idea how that got there (accidental paste??).
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