0
votes

I was trying to use the EXIF library in one of my packages. It worked before but now I get strange messages:

[DCC Fatal Error] F2051 Unit GIFImg was compiled with a different version of CCR.Exif.Consts.SOutOfResources

I don't really get it... Why Delphi tries to recompile one of its files? How do I fix this?

GifImg is located here:

c:\Program Files\Embarcadero\RAD Studio\8.0\source\vcl\GIFImg.pas

Update:

I looked at the date of that file (1 PAS and 2 DCUs) and it has the same date as any other file in RAD Studio\8.0\source\vcl folder. So, the file was not accidentally modified.

Update2:

This is my uses clause:

USES Windows, SysUtils, AnsiStrings, Graphics, Dialogs, Classes, jPeg,
     pngImage,                     
     janFX,   //CCR.Exif,
     {$IFDEF VER150}
        GIFImageFinn     {Delphi 7}
     {$ELSE}  
        GIFImg           {Delphi 2010/XE}
     {$ENDIF}
     ; 

If I comment the CCR.EXIF unit, it starts to compile my package. So, adding EXIF to my package breaks something.

2

2 Answers

1
votes

What you report doesn't quite add up. The GIFImg unit that is part of the Delphi source does not refer to CCR.Exif.Consts.SOutOfResources. And none of the units used by GIFImg refer to it either.

So the explanations that seem plausible to me are:

  1. You are including a unit called GIFImg somewhere in your project.
  2. You've found a compiler bug.

The error message F2051 is emitted typically, in my experience, when you attempt to recompile an RTL/VCL unit but fail to set the project options to match that used by the true RTL/VCL. Alternatively it will be emitted when you recompile an RTL/VCL unit that has modifications in its interface section.

0
votes

Solved:

I removed the dots in the name of the files. CCRExif instead of CCR.Exif.

That was a nasty one.