[英][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.