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

Re: compiling with gettext



On Tue, 13 May 1997, Susan G. Kleinmann wrote:

> I have been trying for some time to solve Bug #8882 against the 'sp'
> package, which says that in order to make it buildable under glibc,
> I need to call libintl as well as libnls in order to accommodate glibc,
> and to define LINUX_TYPES_H for glibc.  I made those changes and could
> no longer get the program to compile.  After a while I realized that
> the changes were unrelated to my inability to compile the program; which
> I tested by going back to the original sources and trying recompilation
> without the fixes.  Sure enough, I got the same error messages:
> 
> 1.  First there's a complaint about an undefined dgettext in 
> lib/MessageTable.cxx.  I think I bludgeoned this one by inserting the
> line 
> #include "/usr/share/gettext/intl/libgettext.h" 
> in the top of that file.  

This means you compiled with libc6 headers but didn't link with libc6.
Linking with libc6 will fix the above, and fully gettextizing the sources
will fix it for libc5.

> 2.  When I then recompile the program I get the message:
> MessageTable.cxx:102: parse error before `const'
> MessageTable.cxx:103: parse error before `const'
> MessageTable.cxx:104: parse error before `while'
> MessageTable.cxx:105: parse error before `while'
> 
> where the four lines in question are:
> extern char *dgettext(const char *, const char *);
> extern char *gettext(const char *);
> extern char *textdomain(const char *);
> extern char *bindtextdomain(const char *, const char *);

The problem is that gettext, etc., are being recognized by the
preprocessor! You don't need these, you should #include the appropriate
libintl.h instead.

-- 
Tom Lees <tom@lpsg.demon.co.uk>			http://www.lpsg.demon.co.uk/
PGP ID 87D4D065, fingerprint 2A 66 86 9D 02 4D A6 1E  B8 A2 17 9D 4F 9B 89 D6
finger tom@master.debian.org for full public key (also available on keyservers)


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: