[yunqa.de] Re: Yustemmer issues

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Mon, 25 Aug 2014 21:47:17 +0200

On 25.08.2014 20:03, George Spears wrote:

I have just upgraded my environment…  Now running XE6, with YuStemmer 3.5.0.
I can get the test app to compile fine.

Great!

When I load my app, and try to compile, I get a lot of errors.  It
appears what is happening is either namespace collisions or overloading
issues.

I have YuStemmer in my USES clause.  It is calling DISystemCompat.
DISystemCompat is where the issues are at.

At approx. line 170, you have

function Utf8ToString(const s: PAnsiChar): UnicodeString;
begin
   Result := UTF8ToUnicodeString(s);
end;

where UTF8ToUnicodeString is another function in this Unit (3 line down).
There is also a function Utf8ToUnicodeString in the System unit.
Subsequently I am getting an error “Ambiguous overloaded call to
‘Utf8ToUnicodeString’ “.

Most strange. For Delphi XE6, Utf8ToString() is not compiled into DISystemCompat.pas. If it is for you there must be something wrong with your DISystemCompat.pas or DICompilers.inc. Did you edit any of these files?

Is there an easy fix to this?

IF IT HELPS ANY, HERE IS THE USES CLAUSE in my program

uses
  {$IFDEF FastMM}{$I FastMM_uses.inc}{$ENDIF}
   DISystemCompat,

  Windows, Messages, System.SysUtils, Variants, System.Classes, Graphics, 
Controls, Forms,
  Dialogs, DB, StdCtrls, DBCtrls, ABSMain, AdvOfficePager, AdvCombo, Lucombo,
  dblucomb, Buttons, Grids, DBGrids, AdvObj, BaseGrid, AdvGrid, DBAdvGrid,
  ExtCtrls, Menus,   JCLAnsiStrings, Generics.Collections, Math,
  TypeDefIncludes, ShellAPI, ShlObj, YuStemmer;

Unfortunately I can not suggest an easy fix as I do not have all units you mention. Also, you are not saying how you use Utf8ToString().

But you think that DISystemCompat.pas is causing you trouble (which I think is not the cause of your problem) I wonder why you left it in your uses list? Utf8ToString() is readily provided by Delphi XE6 System.pas.

A small project with just the standard Delphi units I would help me to reproduce your problem. If you can provide such a project, please send it in and I will be glad to take a look.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: