GIFImg 单元是使用不同版本的 CCR.Exif.Consts.SOutOfResources 编译的

发布于 2024-12-28 09:33:41 字数 934 浏览 4 评论 0原文

我试图在我的一个软件包中使用 EXIF 库。它以前有效,但现在我收到奇怪的消息:

[DCC 致命错误] F2051 单位 GIFImg 使用不同的版本编译 CCR.Exif.Consts.SOutOfResources 的版本

我不太明白...为什么 Delphi 尝试重新编译其文件之一?我该如何解决这个问题?

GifImg 位于此处:

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

更新:

我查看了该文件的日期(1 个 PAS 和 2 个 DCU),它与 RAD Studio 中的任何其他文件具有相同的日期\8.0\source\vcl 文件夹。因此,该文件并非被意外修改。

更新2:

这是我的uses子句:

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

如果我注释CCR.EXIF单元,它就会开始编译我的包。因此,将 EXIF 添加到我的包中会破坏某些内容。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

池予 2025-01-04 09:33:41

你所报告的内容并不完全相符。作为 Delphi 源代码一部分的 GIFImg 单元不引用 CCR.Exif.Consts.SOutOfResourcesGIFImg 使用的单位也没有引用它。

因此,对我来说似乎合理的解释是:

  1. 您在项目中的某处包含了一个名为 GIFImg 的单元。
  2. 您发现了一个编译器错误。

根据我的经验,当您尝试重新编译 RTL/VCL 单元但未能将项目选项设置为与真正的 RTL/VCL 使用的选项相匹配时,通常会发出错误消息 F2051。或者,当您重新编译接口部分有修改的 RTL/VCL 单元时,它将被发出。

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.

叹倦 2025-01-04 09:33:41

已解决:

我删除了文件名中的点。
CCRExif 而不是 CCR.Exif。

那是一件令人讨厌的事情。

Solved:

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

That was a nasty one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文