Bug #19014 2013-05-30 09:25

masuch2

cannot convert wxStringCharType* to wxChar*

Hi,

Within last 3 weeks and maybe more I compile regurarly from cron codeblock from svn repository.

There is appearing error within make step:

g++ -DHAVE_CONFIG_H -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -I../../src/include/mozilla_chardet/mfbt -I../../src/include/mozilla_chardet/nsprpub/pr/include -I../../src/include/mozilla_chardet/xpcom -I../../src/include/mozilla_chardet/xpcom/base -I../../src/include/mozilla_chardet/xpcom/glue -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o ../../src/include/sdk_precomp.h.gch -xc++-header ./sdk_precomp.h

In file included from ./sdk_common.h:132:0,

from ./sdk_precomp.h:13:

./logmanager.h: In function ‘wxString F(const wxChar*, ...)’:

./logmanager.h:24:36: error: cannot convert ‘const wxStringCharType* {aka const char*}’ to ‘const wxChar* {aka const wchar_t*}’ in assignment

make[2]: *** [../../src/include/sdk_precomp.h.gch] Error 1

--- using:

checking for wxWidgets version >= 2.8.8... yes (version 2.9.4)

checking for wxWidgets >= 2.9.0... yes (version 2.9.4)

--- svn

configure: SVN revision 12.11svn8909 (2013-03-09 23:33:20)

kind regards,

M.

(P.S.:coresponding with http://forums.codeblocks.org/index.php/topic,17491.0.html )

Category
Compiler
Group
Platform:Linux
Status
Open
Close date
2013-05-31 14:23
Assigned to
biplab
biplab 2013-05-31 14:23

This bug is now fixed in HEAD.

Thank you for reporting it.

biplab 2013-06-01 05:36

The bug has been reopened as more work is necessary.

biplab 2013-06-05 15:21
An update. Following patch will fix build issue. However it produces runtime assert when wx is compiled as wxstring in utf8 mode. As a result I feel this patch needs more tests.

Index: src/include/logmanager.h
===================================================================
--- src/include/logmanager.h	(revision 9140)
+++ src/include/logmanager.h	(working copy)
@@ -21,7 +21,7 @@
 // cut after the first character
         ::temp_string = msg;
         ::temp_string.Replace(_T("%s"), _T("%ls"));
-        msg = ::temp_string.wx_str();
+        msg = ::temp_string.wc_str();
 #endif
         ::temp_string = wxString::FormatV(msg, arg_list);
         va_end(arg_list);