Bug 62497 - wxGTK-2.4.2-r2 applications do not compile with +unicode
|
Bug#:
62497
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: All
|
Status: RESOLVED
|
Severity: major
|
Priority: P2
|
|
Resolution: INVALID
|
Assigned To: wxwidgets@gentoo.org
|
Reported By: crusaderky@gmail.com
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: wxGTK-2.4.2-r2 applications do not compile with +unicode
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2004-09-01 04:43 0000
|
test.cpp:
#include <wx/wx.h>
class MyApp: public wxApp {
virtual bool OnInit();
};
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit() {
wxString * str = new wxString("Hello world");
return TRUE;
}
$ gcc -c `wx-config --cxxflags` -Wall test.cpp -o test.o
test.cpp: In member function `virtual bool MyApp::OnInit()':
test.cpp:12: error: call of overloaded `wxString(const char[12])' is ambiguous
/usr/include/wx/string.h:323: error: candidates are: wxString::wxString(const
wxWCharBuffer&) <near match>
/usr/include/wx/string.h:306: error:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx/string.h:291: error: wxString::wxString(const
wxString&) <near match>
/usr/include/wx/string.h:284: error: wxString::wxString(int)
<near match>
If I re-emerge wxGTK with USE=-unicode, it compiles smoothly.
wx-config is a symlink to one of the three possible versions you could have
emerged, wxconfig-2.4-config (gtk -gtk2), wxgtk2-2.4-config (gtk2) or
wxgtk2u-2.4-config (gtk2 + unicode).
Please try:
$ gcc -c `wx-config2-2.4-config --cxxflags` -Wall test.cpp -o test.o
I will change the ebuild to symlink to one of the non-unicode ones so at least
all apps will compile.
Let me know if that helps and I'll close this bug. Thanks.
This shouldn't be a problem if you use the correct wc-config. Closing.
Please make the ebuild install the appropriate version based on the user's USE
flags. Making the end-user change use flags is very un-Gentoo. :)