首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启用FASTMM编译器指令后,Indy 10编译失败

启用FASTMM编译器指令后,Indy 10编译失败
EN

Stack Overflow用户
提问于 2018-07-04 16:48:14
回答 1查看 116关注 0票数 0

我使用的是Delphi7,我昨天从Fulgan的页面下载了Indy (10.5462)的最新版本。

有一个批处理文件(Full_d7.bat)通常可以成功编译Indy。

现在,如果我在核心、协议和系统目录的IdCompilerDefines.inc中定义USE_FASTMM4,编译时会返回以下错误:

代码语言:javascript
复制
IdGlobal.pas(2229) Error: Declaration of 'GetBytes' differs from declaration in
interface 'IIdTextEncoding'
IdGlobal.pas(2229) Error: Declaration of 'GetCharCount' differs from declaration
 in interface 'IIdTextEncoding'
IdGlobal.pas(2229) Error: Declaration of 'GetChars' differs from declaration in
interface 'IIdTextEncoding'
IdGlobal.pas(2229) Error: Declaration of 'GetChars' differs from declaration in
interface 'IIdTextEncoding'
IdGlobal.pas(2229) Error: Declaration of 'GetChars' differs from declaration in
interface 'IIdTextEncoding'
IdGlobal.pas(2229) Error: Declaration of 'GetString' differs from declaration in
 interface 'IIdTextEncoding'
IdGlobal.pas(3500) Error: Incompatible types: 'Char' and 'Integer'
IdGlobal.pas(3502) Error: Incompatible types: 'Char' and 'Integer'
IdGlobal.pas(3527) Error: Incompatible types: 'Byte' and 'Char'
IdGlobal.pas(3592) Error: Incompatible types: 'Char' and 'Byte'
IdGlobal.pas(3594) Error: Incompatible types: 'Char' and 'Byte'
IdGlobal.pas(3617) Error: Incompatible types
IdGlobal.pas(3620) Error: Incompatible types: 'Word' and 'Char'
IdGlobal.pas(3663) Error: Incompatible types: 'Char' and 'Byte'
IdGlobal.pas(3665) Error: Incompatible types: 'Char' and 'Byte'
IdGlobal.pas(3687) Error: Incompatible types: 'Word' and 'Char'

这是D7版本中的一个错误,还是我遗漏了什么?在使用FastMM时,是否也需要在配置文件中定义一些内容?

EN

回答 1

Stack Overflow用户

发布于 2018-07-06 05:58:12

当支持没有这些类型的旧编译器时,FastMM声明了它自己的几种Delphi原生数据类型(Native(U)Int(U)IntPtr等)的版本。

然而,它也在D2009之前的所有Delphi版本中声明了PByte,这是它不应该做的(因为PByte在RTL的System单元中可用,至少可以追溯到Delphi5)。PByte的重新声明干扰了Indy在IdGlobal单元中使用PByte -但仅在D2006之前的Delphi版本中(因为Indy在后来的Delphi版本中不直接使用FastMM )。

我已经为Indy注册了一个补丁来解决这个问题(SVN rev 5463),并在FastMM上注册了filed a bug report

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51169500

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档