Author Topic: Can't get to work gnugettext  (Read 5172 times)


  • New Member
  • *
  • Posts: 12
Can't get to work gnugettext
« on: April 06, 2010, 10:56:55 pm »
Related to I'm triying to use gnugettext implementation on both Delphi & FPC.

The Delphi side work as spected, but I can't get to compile the unit in FCP 2.4/Lazarus last trunk/OSX Snow leopard.

I get several errors, (I download from, both from SourceForge and the main site):

1. This conditional is bad (not compile under osx or other unixs):

{$ifndef MSWINDOWS}
{$ifndef LINUX}
  'This version of gnugettext.pas is only meant to be compiled with Kylix 3,'
  'Delphi 6, Delphi 7 and later versions. If you use other versions, please'
  'get the gnugettext.pas version from the Delphi 5 directory.'

Easy fix, not problem.

2. Then I get this:

Code: [Select]
procedure TranslateAllResourceStrings;
var I,J : Longint;
    S   : WideString;
===>  DefaultInstance.DebugWriteln('TranslateAllResourceStrings (ResourceStringTableCount='+IntToStr(ResourceStringTableCount)+')');

gnugettext.pas(929,122) Error: Identifier not found "ResourceStringTableCount"
gnugettext.pas(937,29) Error: Identifier not found "SetResourceStringValue"
gnugettext.pas(1527,24) Error: Incompatible types: got "TStringList" expected "TCSStringList"


Code: [Select]
    for J:=0 to ResourceStringCount(i)-1 do
===>>      S:=DefaultInstance.gettext(GetResourceStringDefaultValue(I,J));

gnugettext.pas(936,63) Error: Identifier not found "GetResourceStringDefaultValue"

What I can do?

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 818
Re: Can't get to work gnugettext
« Reply #1 on: April 06, 2010, 11:06:38 pm »
All of the compilation errors you got, apart from ' Incompatible types: got "TStringList" expected "TCSStringList"', can be solved by compiling the file in Delphi or ObjFPC mode.

Furthermore, FPC itself also includes a gettext unit:

A compiled version of this unit is included with every FPC installation.


TinyPortal © 2005-2018