[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [lmi] Safe to substitute std::string for wxString?
From: |
Vadim Zeitlin |
Subject: |
Re[2]: [lmi] Safe to substitute std::string for wxString? |
Date: |
Thu, 30 Mar 2006 16:21:37 +0200 |
On Thu, 30 Mar 2006 14:14:10 +0000 Greg Chicares <address@hidden> wrote:
GC> > GC> Is there a way to avoid forcing that requirement? Has wx evolved
GC> > GC> conversion operators that make this work automagically?
GC> >
GC> > The sole presence of the conversion ctor wxString(std::string) in the
GC> > library forces to link in libstdc++ which is something some people want to
GC> > avoid when creating statically linked applications under Unix.
GC>
GC> Let me make sure I understand this. I think you're saying that they
GC>
GC> - don't use anything in libstdc++ in their application code
GC>
GC> [I guess they use only wxString, wx containers, and wx streams--or
GC> do they just not use anything in the C++ standard library at all?]
Right. You also can't use RTTI nor exceptions as they require support code
from libstdc++ as well.
GC> - and therefore don't want wx to require libstdc++ either.
Yes because incompatibilities between different libstdc++ versions are
much more common than between libc versions among different distributions
and so it does create a lot of extra trouble and until very recently you
had to either use different builds for different Linux distributions or
forsake libstdc++. Hopefully the situation should get better with the
adoption of g++ 4 and its C++ ABI but I don't hold my breath to be honest.
GC> Is that right? If so, then they couldn't use lmi at all that way,
GC> because lmi uses many C++ standard-library features.
Yes, I don't think there is any drawback in requiring either/both
wxUSE_STD_STRING and wxUSE_STL to be set to 1 for lmi. The only advantage
of not using wxUSE_STL is that official wx builds don't use it (so far) and
so you wouldn't be able to use standard wx packages (.deb, .rpm, ...) if
you do require wxUSE_STL.
Regards,
VZ