Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1620 C++ Localization Static Linking Issue

No_User_Response
closed
nobody
non-mingw (19)
2012-10-19
2012-01-21
Waqar Ali Khan
No

I am using MingW + NetBeans IDE and working on a localized project every thing was fine until i was compiling my program and using dynamic linking. When i switched to static link by "-static" program runs and some part is translated into spanish but some part is not translated. But when i switch back to dynamic linking everything is translated correctly to spanish...

I need to know what the problem is?

i m using normat gettext() function i have created .po file then also have created .mo file and set the environment variable in my code to es_MX. i have no issued when i link as dynamic but when i choose static link option some part of my application is translated and some is not. i m using gtk 2.0 with mingw also...

#include <libintl.h>

string s = "LANG=";
s = s.append("es_MX");
putenv(s.c_str());
setlocale(LC_ALL, "esm");
bindtextdomain(LOCALE_DOMAIN_MAIN, LOCALE_PATH);
textdomain(LOCALE_DOMAIN_MAIN);

samples snapshot for Dynamic Link: http://flic.kr/p/bgtCL6

Static Link: http://flic.kr/p/bgtCRR

Discussion

  • Earnie Boyd
    Earnie Boyd
    2012-06-14

    • labels: --> non-mingw
    • status: open --> pending
     
  • Earnie Boyd
    Earnie Boyd
    2012-06-14

    Waqar, did you get this resolved? You may want to go to mingw-users@lists.sourceforge.net with this if you still need help.

     
  • Earnie Boyd
    Earnie Boyd
    2012-10-19

    • milestone: --> No_User_Response
    • status: pending --> closed