I'm trying to compile one simple application with internationalization
that has a Fl_Menu, havint it fluid generates a static field for the menu
with calls to the translation function:
Fl_Menu_Item Sqlite3cc_Window::menu_menu_bar[] = {
{_tr("File"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 16, 0},
{_tr("New DB"), 0x4006e, 0, 0, 0, FL_NORMAL_LABEL, 0, 16, 0},
{_tr("Open DB"), 0x4006f, 0, 0, 0, FL_NORMAL_LABEL, 0, 16, 0},
{_tr("Attach DB"), 0x40061, 0, 0, 0, FL_NORMAL_LABEL, 0, 16, 0},
...
The translation function "_tr()" is a home made one, the problem is that
the static menu table gets initialized before my translation function is
ready.
Searching on the net I saw that gcc has
"__attribute__((init_priority(300)))" but it's not easy to get it properly
with other unknown code linked together.
Probably we should use another strategy to initialize static class fields
that can have dynamic code ?
Any idea how to solve this ?
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev