User forums > General (but related to Code::Blocks)
Implicit wxString to char* conversion in src/sdk/projectloader.cpp
stahta01:
--- Quote from: jdx on April 10, 2023, 02:06:10 pm ---
--- Quote from: stahta01 on April 10, 2023, 01:56:05 pm ---How did you try to build Code::Blocks?
Using CB and CB Projects?
--- End quote ---
Yes.
--- Quote from: stahta01 on April 10, 2023, 01:56:05 pm ---Or other method?
--- End quote ---
Is there another method? I'm dreaming of cmake.
--- End quote ---
Another poster was trying to add cmake as a build method (I have no idea which OS); I never got configure/make build to result in a working C::B.
Tim S.
stahta01:
What patches are you using on the CB project? And/or, which CB Projects are you using?
Tim S.
stahta01:
I got the same error after this patch/change. Tim S.
Now researching the proper code fix.
Tim S.
--- Code: ---Index: src/CodeBlocks_wx32_64.cbp
===================================================================
--- src/CodeBlocks_wx32_64.cbp (revision 13254)
+++ src/CodeBlocks_wx32_64.cbp (working copy)
@@ -649,7 +649,7 @@
<Add option="-DwxUSE_UNICODE" />
<Add option="-D_WIN64" />
<Add directory="$(#WX32_64.include)" />
- <Add directory="$(#WX32_64.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
+ <Add directory="$(#WX32_64.lib)/wx/include/msw-unicode-3.2" />
<Add directory="sdk/wxscintilla/include" />
<Add directory="include/tinyxml" />
</Compiler>
--- End code ---
stahta01:
Looks like the changes are too much for me to figure out and do quickly.
Edit: Found some 3 year old work updating it to wxWidgets 3.2.x.y; could not find the more recent work likely was on my hard-drive that crashed.
Tim S.
stahta01:
--- Quote from: PB on April 10, 2023, 09:38:42 am ---
--- Quote from: jdx on April 09, 2023, 02:22:49 pm ---It looks like the author(s) must have relied on some implicit wxString -> char* conversion.
--- End quote ---
For better or worse, wxString is convertable to char* by default, see https://docs.wxwidgets.org/stable/overview_string.html#overview_string_implicitconv
Perhaps you built wxWidgets with wxUSE_UNSAFE_WXSTRING_CONV defined to 0?
--- End quote ---
Noop, wxUSE_UNSAFE_WXSTRING_CONV is 1; but both wxUSE_STL and wxUSE_STD_STRING_CONV_IN_WXSTRING are also one.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version