XE7链接运行时包问题(XE7 link runtime package issue)

编程入门 行业动态 更新时间:2024-10-22 02:49:10
XE7链接运行时包问题(XE7 link runtime package issue)

我正在将我的代码从Delphi 2007移到XE7。 我的程序使用后期绑定包方式。 所以我用“链接运行时包”选项编译我的应用程序。 2007年我用这种方式很长一段时间。

但在XE7中,相同的包结构,原因:

“单元X使用不同版本的Y.Txyz编译”错误消息。

单位X在我的一个包裹中。 Y单元也在库包中。 关系似乎没问题。 为什么XE7会出现此错误? 我尝试了以下方法:

我清除了.dcu文件。 我在包中打开Build as Needed选项。 构建所有包和应用程序文件。

编译器传递一些错误,但重复“..编译与不同的版本..”类型错误在其他地方..

我不清楚这个问题。 XE7的逻辑有变化吗? 最好的祝福

I am moving my code from Delphi 2007 to XE7. My program use late binding package way. So I compile my application with "link with runtime packages" options. I used this way for a long time with 2007.

But in XE7, same package structure, cause:

"Unit X was compiled with different version of Y.Txyz" error message.

Unit X in one of my package. Y unit is in a library package also. Relation seems ok. Why XE7 gives this error? I tried following ways:

I cleared .dcu files. I open Build as Needed option in packages. Build All every package and application files.

Compiler pass some errors but repeat ".. compiled with different version .." type error somewhere else..

I am not clear about this issue. Is there changing in logic of XE7? Best Regards

最满意答案

我专注于这个问题,我从Delphi2007中实现了一些不同的XE7。

编译器搜索* .dcu文件。 如果以某种方式生成多个版本的* .dcu文件,则其中一个包可以生成“使用不同版本编译的单元”错误。

如果源包声明为“Rebuild as Needed”,则在使用源包编译其他包时,再次编译单元并生成新的dcu文件。 所以,相反,检查“显式重建”。

我创建了常见的dcu路径,并在“单元输出目录”中为所有包声明。

I focused on the problem and I realised some differencies XE7 from Delphi2007.

Compiler search for *.dcu files. If there is more than one version of *.dcu files produced somehow, than one of the package can produce "unit compiled with different version" error.

If source package declared as "Rebuild as Needed", when compilingg other packages using source package, compile units again and produce new dcu files. So, Instead, check "Explicit Rebuild".

I created common dcu path and declared in "unit output directory" for all packages.

更多推荐

本文发布于:2023-08-05 21:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1439316.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:链接   link   issue   package   runtime

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!