Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62497 - wxGTK-2.4.2-r2 applications do not compile with +unicode
Summary: wxGTK-2.4.2-r2 applications do not compile with +unicode
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo wxWidgets project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 04:43 UTC by crusaderky
Modified: 2004-12-22 08:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crusaderky 2004-09-01 04:43:45 UTC
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.
Comment 1 Rob Cakebread (RETIRED) gentoo-dev 2004-09-01 14:32:10 UTC
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.
Comment 2 Rob Cakebread (RETIRED) gentoo-dev 2004-10-09 14:44:27 UTC
This shouldn't be a problem if you use the correct wc-config. Closing.
Comment 3 Nathan Adams 2004-12-22 08:10:12 UTC
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. :)