简体   繁体   English

[DCC致命错误]:F2051单元ApFileIO是使用不同版本的***编译的。{ApCollections} TLinkList <uPublic.TApObject>

[英][DCC Fatal Error]: F2051 Unit ApFileIO was compiled with a different version of ***.{ApCollections}TLinkList<uPublic.TApObject>

I have seen similar questions and I've examined them but I didn't solve any problem. 我看到过类似的问题,并且已经检查过,但没有解决任何问题。 I have all the sources and the error is about two units I've written myself and they are both in the main directory of my app. 我拥有所有来源,并且错误大约是我自己写的两个单元,它们都在我的应用程序的主目录中。 I've been having the problem since I used the template method of writing classes. 自从我使用编写类的模板方法以来,我一直遇到问题。 Here's the situation with my app: I wrote a new unit for implementing link list for any kind of object so I wrote TLinkList<T> = class which works perfectly fine. 这是我的应用程序的情况:我编写了一个用于为任何类型的对象实现链接列表的新单元,因此我编写了TLinkList<T> = class ,它工作得很好。 Since the time I wrote this class, I'm having this problem. 自从我写这堂课以来,我就遇到了这个问题。 It doesn't compile in normal situations and what I have to do is to comment some of the code in ApFileIO unit and compile the program, and then uncomment the code again! 它在正常情况下无法编译,我要做的是注释ApFileIO单元中的某些代码并编译程序,然后再次取消注释代码! I'm tired of commenting and uncommenting my codes, so I was wondering if there is anyway to fix this error. 我已经厌倦了注释和取消注释我的代码,所以我想知道是否仍然可以解决此错误。 Thx in advance. 提前谢谢。

Believe it or not, the problem is solved by not using inline functions. 信不信由你,不使用inline函数可以解决问题。 I removed inline directives of unit *** (which is mentioned in the question subject) and ApCollections . 我删除了单元*** (在问题主题中提到)和ApCollections inline指令。 This solved the problem. 这样就解决了问题。 Thank you everybody for helping. 谢谢大家的帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 F2051:单位%s使用不同版本的%s编译 - F2051: Unit %s was compiled with a different version of %s F2051 单元用不同的版本编译(再次) - F2051 Unit was compiled with a different version (again) Delphi Seattle,编译错误:F2051单元System.SysUtils使用其他版本的“” .GetMappedFileName编译 - Delphi Seattle, Compile Error: F2051 Unit System.SysUtils was compiled with a different version of “”.GetMappedFileName F2051 单元 JclUnitVersioning 是用不同版本的 System.Contnrs.TObjectList.Remove 编译的 - F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove F2051单元ADODB使用其他版本的ADOInt._Command编译 - F2051 Unit ADODB was compiled with a different version of ADOInt._Command Delphi XE4-F2051单元iOSapi.Foundation是使用其他版本的Macapi.ObjectiveC.TOCGenericImport`2.GetOCClass编译的 - Delphi XE4 - F2051 Unit iOSapi.Foundation was compiled with a different version of Macapi.ObjectiveC.TOCGenericImport`2.GetOCClass 当并非所有程序员都可以访问完整源代码时,如何避免Delphi致命错误F2051 - How to avoid Delphi fatal error F2051 when not all programmers have access to complete source DCC 致命错误 F2588 链接器错误代码:1 ($00000001) - DCC Fatal Error F2588 Linker error code: 1 ($00000001) Delphi XE3:[dcc32致命错误] Unit5.pas(7):F1026找不到文件:“ RzEdit.dcu” - Delphi XE3: [dcc32 Fatal Error] Unit5.pas(7): F1026 File not found: 'RzEdit.dcu' Delphi泛型TDictionary原因[DCC致命错误] F2084内部错误:L1737消息 - Delphi Generics TDictionary causes [DCC Fatal Error] F2084 Internal Error: L1737 message
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM