jumaris / indyproject

Automatically exported from code.google.com/p/indyproject
0 stars 0 forks source link

Compiler error in IdGlobalProtocols(4825) when compiling with USE_ICONV in Delphi 2009 #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. set the conditional symbol USE_ICONV
2. compile a project which uses Indy (for example a TIdHTTPServer)

What is the expected output? What do you see instead?

* compilation fails with two error messages, first in line 4825:

[DCC Error] IdGlobalProtocols.pas(4825): E2250 There is no overloaded version 
of 'LoadFromStream' that can be called with these arguments

AStrings.LoadFromStream(AStream, LEncoding);

and the second error:

[DCC Error] IdGlobalProtocols.pas(4867): E2250 There is no overloaded version 
of 'LoadFromStream' that can be called with these arguments

AStrings.LoadFromStream(AStream, LEncoding);

What version of the product are you using? On what operating system?

Current SVN trunk rev 4906

It seems to be caused by this code in IdCompilerDefines.inc:

  {$IFDEF HAS_TEncoding}
    {$IFNDEF USE_ICONV}
      {$DEFINE TIdTextEncoding_IS_NATIVE}
    {$ENDIF}
  {$ENDIF}

which defines TIdTextEncoding_IS_NATIVE only if USE_ICONV is not defined, so 
the type of the second parameter in the call of LoadFromStream does not match.

Original issue reported on code.google.com by michael....@gmx.net on 3 Jan 2013 at 6:38

GoogleCodeExporter commented 9 years ago

Original comment by gambit47 on 4 Feb 2013 at 7:46