[Vala] [Genie] Problem with gettext



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.





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