Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#142 The LOCALE_* constants break C++Builder support

open
nobody
None
5
2008-06-18
2008-06-18
audacia
No

The dxgettext revision referenced here:
http://compaspascal.blogspot.com/2008/05/gnu-gettext-for-delphi-2008-available.html
defines the following constants:
// gnugettext.pas, l. 427ff
const
LOCALE_SISO639LANGNAME = $59; // Used by Lazarus software development tool
LOCALE_SISO3166CTRYNAME = $5A; // Used by Lazarus software development tool

Those constants are defined as macros in the Windows SDK header winnls.h, l. 577f:
#define LOCALE_SISO639LANGNAME 0x00000059 // ISO abbreviated language name
#define LOCALE_SISO3166CTRYNAME 0x0000005A // ISO abbreviated country name

Therefore, the existence of the two constants in gnugettext.pas causes compilation errors in C++Builder.

Resolution:

Add these two lines after the definitions:

{$NODEFINE LOCALE_SISO639LANGNAME} // already defined in winnls.h
{$NODEFINE LOCALE_SISO3166CTRYNAME} // dito

Discussion

  • audacia
    audacia
    2008-06-18

    Logged In: YES
    user_id=1775013
    Originator: YES

    Sorry, I did not see the other bug report on the same issue.