[gnomemm] gnomemm_hello



Hi all,

I've just been looking at making a project of mine use 
autoconf/automake/gettext, and was looking at gnomemm_hello as an example.

I had a couple of problems getting it to compile, which I've resolved, but I'm 
not sure if I have done so in the correct way.

1. Easy one: src/hello.cc uses a std::vector<string> which should be a 
std::vector<std::string>.

2. This one I'm not so sure about: It appears that in 
<gnomepath>/include/libbonobo-2.0/bonobo/bonobo-i18n.h, some symbols such as 
"gettext" are #defined if ENABLE_NLS is not defined. This causes parse errors 
in glibc's libintl.h later. ENABLE_NLS is defined in the config.h, so adding 
the following to src/hello.cc and src/application.cc ahead of any other 
#includes fixes the problem:

#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif

(Alternate solutions are CPPFLAGS="-DENABLE_NLS" before ./configure-ing, or 
adding just #define ENABLE_NLS instead of the above, but I don't know enough 
about how it's all supposed to work to know what's right.)

I'm getting some other warnings, which I think are due to using newer 
autoconf/automake/gettext than gnomemm_hello was intended for, but they only 
occur when I try to invoke those tools. The above problems occur on a 
straight ./configure && make.

I am using:
gcc 3.2, glibc 2.2.5 [both with small bugfix patches from their CVS branches]
autoconf 2.54, automake 1.7, gettext 0.11.5
gtkmm-2.0.0candidate4,
gconfmm-1.3.8, libgnomeuimm-1.3.10 [both patched to use 
gtkmm_generate_extra_defs-2.0 instead of 1.3, libgnomeuimm patched with Alain 
Rouge's patch to remove dependency on ../../../libgnomecanvasmm/...]
libgnomemm-1.3.7
libbonobo-2.0.1

Regards,
Ainsley



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