Hi, GETTEXT_PACKAGE must be a macro. you can define it with the -D option or, if you use a building system, add the config.h file for all sources files with the -include option for gcc (-X '-include config.h')
2009/6/16 Nicolas <c.r....@wanadoo.fr> > Hi, > > I have a strange problem using gettext. > This is my code: > > const GETTEXT_PACKAGE : string = "NicEdit" > const LOCALE_DIR : string = "/usr/local/lib/locale" > const VERSION : string = "1.0" > > init > Gtk.init (ref args) > Intl.textdomain(GETTEXT_PACKAGE) > Intl.bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR) > Intl.bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8") > Environment.set_application_name(GETTEXT_PACKAGE) > var test = new NicEdit () > test.open_file(args[1]) > test.show_all () > Gtk.main () > > The conversion with valac work correctly, but with gcc, i have this > message: > > In file included from /usr/home/niko/Desktop/test/nicedit.c:5: > /usr/local/include/glib-2.0/glib/gi18n-lib.h:29:2: error: #error You must > define GETTEXT_PACKAGE before including gi18n-lib.h. > > Is this a problem in my code ? > > Thanks in adavance, > Nicolas. > > > _______________________________________________ > Vala-list mailing list > Vala-list@gnome.org > http://mail.gnome.org/mailman/listinfo/vala-list > -- Nicolas Joseph Responsable des rubriques C et GTK+ de developpez.com / In charge of the C and GTK+ sections on developpez.com http://nicolasj.developpez.com
_______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list