bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bindtextdomain, textdomain, and gettext not getting called.


From: David Bruce
Subject: Re: bindtextdomain, textdomain, and gettext not getting called.
Date: Fri, 9 Nov 2007 03:13:36 +0000
User-agent: KMail/1.9.7

Hi Bruno,

(I inadvertently sent my first reply just to you rather than the list)

On Thursday 08 November 2007 02:13:08 am Bruno Haible wrote:
> David Bruce wrote:
> > When I build the program, gcc warns about "statements with no effect"
> >
> > ../../trunk/src/tuxmath.c: In function âmainâ:
> > ../../trunk/src/tuxmath.c:43: warning: statement with no effect
> > ../../trunk/src/tuxmath.c:44: warning: statement with no effect
> > ../../trunk/src/tuxmath.c:45: warning: statement with no effect
> > ...
> >
> > The gettext FAQ says:
> > >If gettext/dgettext/dcgettext is not called at all, the possible cause
> > > might be that some autoconf or Makefile macrology has turned off
> > >internationalization entirely (like the --disable-nls configuration
> > > option usually does).
>
> The FAQ is pointing into the right direction. In gettext.h there is a
>   #if ENABLE_NLS
> The gcc warnings indicate that ENABLE_NLS was not set.
>
> Are you using the AM_GNU_GETTEXT macro, as described in the GNU gettext
> manual, chapter "The Maintainer's View"? If so, what is the configure-time
> output of this macro?
>
> Bruno

At least one error of mine appeared to be just putting in "AM_GNU_GETTEXT", 
without the arguments.  Today I have been studying the source for GNU Hello 
to try to find out what I need to do.  The gettext-related macros in my 
configure.ac now are:

# i18n support from GNU gettext.
AC_GNU_SOURCE
AM_GNU_GETTEXT_VERSION([0.16])
AM_GNU_GETTEXT([no-libtool], ,[$(top_builddir)/intl/])

My project has an intl dir, as it is built on Windows (and BeOS) as well as  
Linux.  The args for AM_GNU_GETTEXT are intended to be appropriate for a 
project that contains its own intl.

However, it still doesn't run the needed functions (bindtextdomain, 
textdomain) even though ENABLE_NLS has been set to 1 before main() starts.  

I'm at a loss as to where to look to figure this out.  I've been coding for a 
number of years, but I'm just a self-taught amateur trying to make a 
contribution.  Since GNU Hello does work correctly on my system, I guess I 
can just try to replicate exactly what Hello does with respect to NLS.

Thanks for any help or advice,

-- 
David Bruce




reply via email to

[Prev in Thread] Current Thread [Next in Thread]