Bug #16076 2009-07-30 21:53

techy

Compilation failure when wxWidgets is compiled in ANSI mode

CodeBlocks fails to compile when wxWidgets is compiled in ANSI (non-unicode) mode:


libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../src/include -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include -I../../src/include/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT filemanager.lo -MD -MP -MF .deps/filemanager.Tpo -c filemanager.cpp  -fPIC -DPIC -o .libs/filemanager.o
filemanager.cpp: In function ‘bool WriteWxStringToFile(wxFile&, const wxString&, wxFontEncoding, bool)’:
filemanager.cpp:218: error: no matching function for call to ‘wxMBConvUTF7::cWC2MB(const wxChar*, size_t&, size_t*)’
/usr/local/include/wx-2.8/wx/strconv.h:89: note: candidates are: const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*) const
/usr/local/include/wx-2.8/wx/strconv.h:106: note:                 const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*, size_t, size_t*) const
filemanager.cpp:223: error: no matching function for call to ‘wxMBConvUTF8::cWC2MB(const wxChar*, size_t&, size_t*)’
/usr/local/include/wx-2.8/wx/strconv.h:89: note: candidates are: const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*) const
/usr/local/include/wx-2.8/wx/strconv.h:106: note:                 const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*, size_t, size_t*) const
filemanager.cpp:228: error: no matching function for call to ‘wxMBConvUTF16BE::cWC2MB(const wxChar*, size_t&, size_t*)’
/usr/local/include/wx-2.8/wx/strconv.h:89: note: candidates are: const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*) const
/usr/local/include/wx-2.8/wx/strconv.h:106: note:                 const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*, size_t, size_t*) const
filemanager.cpp:233: error: no matching function for call to ‘wxMBConvUTF16LE::cWC2MB(const wxChar*, size_t&, size_t*)’
/usr/local/include/wx-2.8/wx/strconv.h:89: note: candidates are: const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*) const
/usr/local/include/wx-2.8/wx/strconv.h:106: note:                 const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*, size_t, size_t*) const
filemanager.cpp:238: error: no matching function for call to ‘wxMBConvUTF32BE::cWC2MB(const wxChar*, size_t&, size_t*)’
/usr/local/include/wx-2.8/wx/strconv.h:89: note: candidates are: const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*) const
/usr/local/include/wx-2.8/wx/strconv.h:106: note:                 const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*, size_t, size_t*) const
filemanager.cpp:243: error: no matching function for call to ‘wxMBConvUTF32LE::cWC2MB(const wxChar*, size_t&, size_t*)’
/usr/local/include/wx-2.8/wx/strconv.h:89: note: candidates are: const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*) const
/usr/local/include/wx-2.8/wx/strconv.h:106: note:                 const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*, size_t, size_t*) const
filemanager.cpp:263: error: no matching function for call to ‘wxCSConv::cWC2MB(const wxChar*, size_t&, size_t*)’
/usr/local/include/wx-2.8/wx/strconv.h:89: note: candidates are: const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*) const
/usr/local/include/wx-2.8/wx/strconv.h:106: note:                 const wxCharBuffer wxMBConv::cWC2MB(const wchar_t*, size_t, size_t*) const


The problem is present since revision 5682 - when reverting to previous revision of this file, everything compiles OK. The reason probably is that in ANSI mode the first parameter of cWC2MB() is const char* while cWC2MB() expects const wchar_t*. Probably missing some #ifdef's which were present in the previous revision.
Category
Application::Error
Group
 
Status
Closed
Close date
2010-02-03 17:45
Assigned to
mortenmacfly
mortenmacfly 2010-02-03 17:45

This bug is now fixed in HEAD.

Thank you for reporting it.