Eike Lange wrote:
Hi Folks!
I'd like to improve the facilities of our `intl' unit which interfaces GNU Gettext. There is one little problem with it: The user of this unit might not know where to install and retrive the locale informations, needed by `BindTextDomain'.
- A common place under Unix like systems might be
/Executable-Path-Without-Bin/share/locale which is well defined for Linux.
- What about DJGPP, MinGW, CygWin, MacOS, ...?
Are there common rules to find the locale directory?
As a reference source code for this problem, you might want to have a look at `gettextdemo.pas'.
Trying to compile `gettextdemo.pas' on Mac OS X results in an error message:
[G4:doc/gpc/demos] adriaan% gpc --automake -o gettextdemo gettextdemo.pas /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c:23:21: libintl.h: No such file or directory
There is no 'libintl.h' anywhere on my Mac. I looked in contribs/eike at www.gnu-pascal.de for additional files to install, but the README file states "The Unit for internationalisation (i18n) has moved to the official GPC 2.1 source tree."
So, can you give me some more information ?
Regards,
Adriaan van Os
-------
[G4:doc/gpc/demos] adriaan% gpc -v Reading specs from /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ specs Configured with: ../gpc-20030323/configure --enable-languages=pascal,c --prefix=/Developer/Pascal/gpc321d10 --enable-threads=posix Thread model: posix gpc version 20030323, based on gcc-3.2.1
[G4:doc/gpc/demos] adriaan% gpc --automake -o gettextdemo gettextdemo.pas /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c:23:21: libintl.h: No such file or directory /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c: In function `_p_CGetText': /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c:94: warning: return makes pointer from integer without a cast /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c: In function `_p_CDGetText': /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c:99: warning: return makes pointer from integer without a cast /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c: In function `_p_CDCGetText': /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c:104: warning: return makes pointer from integer without a cast /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c: In function `_p_CTextDomain': /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c:109: warning: return makes pointer from integer without a cast /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c: In function `_p_CBindTextDomain': /Developer/Pascal/gpc321d10/lib/gcc-lib/powerpc-apple-darwin6.3/3.2.1/ units/intlc.c:114: warning: return makes pointer from integer without a cast gpc1: gpc exited with status 1 gpc1: gpc exited with status 1