kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #09708
Locale fix in KiCAD is not working (breaks my build)
Hello Miguel,
My WX is 2.8
Your WX is 2.9 I guess
http://wiki.wxwidgets.org/Converting_everything_to_and_from_wxString
I think there should be a cleaner way to handle this kind of thing.
(comma/dot in floating point)
Would it be possible to set LC_NUMERIC someway?
char prvlocale[255];
strcpy( prvlocale, wxSetlocale(LC_NUMERIC, NULL) );
const char *oldLocale = wxSetlocale(LC_NUMERIC, "C");
/* DO STUFF HERE */
if ( !oldLocale )
{
/* the current locale was not changed; no need to */
/* restore the previous one... */
} else {
/* restore the original locale */
wxSetlocale(LC_NUMERIC, prvlocale);
}
/home/oetelaar/kicad_dev/kicad/pcbnew/footprint_wizard.cpp: In member
function ‘void FOOTPRINT_WIZARD_FRAME::ParametersUpdated(wxGridEvent&)’:
/home/oetelaar/kicad_dev/kicad/pcbnew/footprint_wizard.cpp:190: error:
no matching function for call to ‘wxString::Replace(const char [2],
const char [2])’
/usr/include/wx-2.8/wx/string.h:1173: note: candidates are: size_t
wxString::Replace(const wxChar*, const wxChar*, bool)
make[2]: *** [pcbnew/CMakeFiles/_pcbnew.dir/footprint_wizard.cpp.o] Error 1
make[1]: *** [pcbnew/CMakeFiles/_pcbnew.dir/all] Error 2
Follow ups