Delphi 在启用FASTMM编译器指令的情况下,Indy 10编译失败

Delphi 在启用FASTMM编译器指令的情况下,Indy 10编译失败,delphi,compiler-errors,delphi-7,indy,indy10,Delphi,Compiler Errors,Delphi 7,Indy,Indy10,我用的是Delphi7。昨天我从富尔根的网页上下载了最新版本的Indy(10.5462) 有一个批处理文件(Full_d7.bat),通常可以成功编译Indy 现在,如果我在Core、Protocols和System目录的IdCompilerDefines.inc中定义USE_FASTMM4,编译时会返回以下错误: IdGlobal.pas(2229) Error: Declaration of 'GetBytes' differs from declaration in interface '

我用的是Delphi7。昨天我从富尔根的网页上下载了最新版本的Indy(10.5462)

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

现在,如果我在Core、Protocols和System目录的IdCompilerDefines.inc中定义USE_FASTMM4,编译时会返回以下错误:

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时,是否也需要在配置文件中定义某些内容?

FastMM在支持没有这些类型的旧编译器时,声明了其自己版本的几种Delphi本机数据类型(
native(U)Int
(U)IntPtr
,等等)

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


我已经为Indy检查了一个补丁来解决这个问题(SVN版本5463),并使用FastMM。

这些错误意味着FastMM可能正在重新说明Indy使用的一些基本数据类型,如
PByte
等。Indy在
实现
部分的
使用
子句中指定了FastMM,不在
接口
部分,因此这些类型的任何重新声明都将优先,从而导致
接口
实现
不同。我必须看看FastMM实际上在做什么,并相应地调整Indy。还有一个有趣的问题:FastMM.dcu的路径在Delphi7的库/浏览路径中。但当我运行Full_d7.bat时,它会说找不到FastMM.dcu。将文件复制到Core、Protocols和Sytem目录可以解决问题,但这不是很优雅。IDE的搜索路径不适用于命令行编译。您必须确保FastMM位于环境的
%PATH%
中。您可以忽略批处理文件,而是从IDE中打开/编译/安装项目。