Duplicate resource file

Asked

Viewed 54 times

2

I am with a project that has the following resource file directives:

{$R *.DFM}
{$R UAC.res}

After I copied a part of the project into another folder, it presents me with the following error after compiling:

"[DCC Error] E2161 Warning: Duplicate Resource: Type 24 (user-defined) ID 1; File D: Emailrb Project EMAILRB.res Resource Kept; file UAC.res Resource discarded."

EMAILRB.res is created by compiling the project and UAC.res, was a file I created to bypass a Windows UAC limitation.

How do I solve this problem?

  • 1

    It is likely that somewhere in the project the directive of {$R *.res} then he would be informing you that the UAC.res this duplicate.

1 answer

3

Go to the project source, (Project-> View Source menu) and check the directive {$R *.res} was not defined.

If all files are defined .res will be added automatically, without the need to declare in other parts.

When compiling the project Unit will attach all .res and when compiling the Units it attaches the declared ones, that is, there is the duplicity!

Just remove the UAC.res of the declaration.

  • Thank you Junior for the return. I will check here and return the result.

  • Solved. I deleted the file "EMAILRB.res" and, when recompiling, Delphi recreated it and no longer gave the duplicity error. I thank everyone who helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.