GIFImg 单元是使用不同版本的 CCR.Exif.Consts.SOutOfResources 编译的
我试图在我的一个软件包中使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你所报告的内容并不完全相符。作为 Delphi 源代码一部分的
GIFImg
单元不引用CCR.Exif.Consts.SOutOfResources
。GIFImg
使用的单位也没有引用它。因此,对我来说似乎合理的解释是:
GIFImg
的单元。根据我的经验,当您尝试重新编译 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 toCCR.Exif.Consts.SOutOfResources
. And none of the units used byGIFImg
refer to it either.So the explanations that seem plausible to me are:
GIFImg
somewhere in your project.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.已解决:
我删除了文件名中的点。
CCRExif 而不是 CCR.Exif。
那是一件令人讨厌的事情。
Solved:
I removed the dots in the name of the files.
CCRExif instead of CCR.Exif.
That was a nasty one.