Trunk compilation failure (--enable-stl/--enable-std_string)

Jan van Dijk jan at epgmod.phys.tue.nl
Mon Feb 11 02:10:23 PST 2008


	Hello,

Today's trunk cannnot be built with --enable-stl/--enable-std_string. 

gcc tells me:

../src/common/xlocale.cpp: In constructor ‘wxXLocale::wxXLocale(wxLanguage)’:
../src/common/xlocale.cpp:94: error: no matching function for call 
to ‘wxXLocale::Init(const wxString&)’
../include/wx/xlocale.h:105: note: candidates are: void wxXLocale::Init(const 
char*)

Indeed, in wx/string.h I see that implicit conversion to const char* is 
disabled in STL-builds (and there is a clear comment why):

#if !wxUSE_STL
    operator const char*() const { return c_str(); }
...
#endif

Assuming that --enable-stl/--enable-std_string is the way to go, isn't it 
about time to remove the latter conversions completely before the next stable 
release (in which case this problem would have been detected already)? People 
shall have to learn to deal with the new wxString anyway...

With kind regards,

	Jan van Dijk.




More information about the wx-dev mailing list