F2051单元JclUnitVersioning是使用其他版本的System.Contnrs.TObjectList.Remove编译的 [英] F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove

查看:177
本文介绍了F2051单元JclUnitVersioning是使用其他版本的System.Contnrs.TObjectList.Remove编译的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Delphi 2项目迁移到RAD Studio XE2.

I'm migrating a Delphi 2 project to RAD Studio XE2.

当我尝试编译时,我会得到

When I try to compile I get

[DCC致命错误] MyUnit.pas(9):F2051单元JclUnitVersioning是使用其他版本的System.Contnrs.TObjectList.Remove编译的

[DCC Fatal Error] MyUnit.pas(9): F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove

在下一行:

unit MyUnit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, DB, DBTables, TB97, ExtCtrls, Grids, DBGrids, Vcl.Mask, JvExMask,
  Vcl.DBLookup,
  JvToolEdit,  {<-- error here}
  TB97Ctls;

{...}

我尝试卸载并重新安装RAD Studio,JCL和JVCL,但没有任何变化.

I tried uninstalling and reinstalling RAD Studio, JCL and JVCL, but nothing changes.

更新正在使用二进制Jedi

Update Was using the binary Jedi installer from A.Hausladen (intended for use in Delphi trial editions only).

推荐答案

您周围有旧的DCU文件需要重建或删除,或者您的项目或库路径内容不一致. (找到不在适当的"JCL库"文件夹中的名为JclUnitVersioning.dcu的文件,然后将其删除.根据您的delphi版本号,适当的库文件夹通过jcl\lib\d16命名为jcl\lib\d7)

You either have old DCU files lying around that need to be rebuilt, or removed, or your project or library path contents are not consistent. (Find files named JclUnitVersioning.dcu that are not in the proper JCL Library folder, and remove them. The proper library folders are named jcl\lib\d7, through jcl\lib\d16, depending on your delphi version number )

这通常意味着您的项目可以访问包含预编译DCU文件的库路径(或项目搜索路径)中的目录,也可以访问某些源单元(.pas文件) ,并且依赖于其他单元的一个或多个单元是在与现在不同的时间编译的,并且具有同一单元的多个版本.我希望能给你画一幅画.

This usually means that your project has access to both a directory that is in your library-path (or project search path) that contains pre-compiled DCU files, and may also have access to some source units (.pas files), and that one or more of the units that depends on other units, was compiled at a different time than now, with multiple versions of a common unit. I wish I could draw you a picture.

想象一下,您有一辆汽车,有人升级了引擎,将其从V6更改为V8.现在,以前曾经为您的发动机维修的人回来了,并试图找到V6排气歧管的安装位置.它不存在了,它已经移动了.由于新引擎被冻结为当前形状(请在这里陪我!),您的服务技术人员会简单地回覆您(客户),并说:对不起,我很困惑,我无法继续,我放弃了. ".这就是该错误消息的大致含义.

Imagine you have a car, and someone upgrades the engine, changing it from a V6 to a V8. Now someone who had previously been servicing your engine comes back and tries to find the place where the V6's exhaust manifold attached. It's not there any more, it's moved. Since the new engine is frozen in its current shape (stay with me here!), your service technician simply goes back to you (the customer) and says, "sorry, I'm confused, I can't continue, I give up". That's roughly what this error message means.

可以通过多种方式对其进行清理;对于您来说,确保从.pas文件进行100%编译,并且完全没有包含.dcu文件的库文件夹,对您来说可能是一件简单的事情.当然,这并不是很理想,因为库"路径的全部目的是包含一个预编译的DCU文件库".

Cleaning it up is possible in several ways; It may be a simple matter for you to make sure you compile 100% from .pas files, and have no Library folders containing .dcu files at all. Of course, that's hardly ideal, is it, since the whole purpose of a Library path was to contain a precompiled "library" of DCU files.

因此,我建议您进行清理(删除所有DCU文件)并从源代码重建所有组件包(您确实有一个用于此目的的批处理文件吗?),然后查看项目的搜索路径,并库路径,以查看它们都只包含您认为应包含的文件夹.

So instead, I suggest you do a cleanup (delete all your DCU files) and rebuild all your component packages from source (you do have a batch file for that purpose right?) and then review both your project's search path, and library path to see that both contain only the folders you think they should contain.

这篇关于F2051单元JclUnitVersioning是使用其他版本的System.Contnrs.TObjectList.Remove编译的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆