Closed posxposy closed 9 months ago
Yes, hxcpp has a weird setup where pcre gets compiled twice with different options, we have to replicate that to re-enable smart-strings.
I'm still getting "Regexp compilation error : this version of PCRE2 does not have Unicode support in (Name|Description|Size|names)$"
, something else is needed?
regextest.zip
Different problem. Also fixed.
Describe the bug Hey! Looks like hxcpp smart strings are broken in Kha. Not sure what happened, but after updating Kha, the code like
trace('живопліт')
will not be compiled with an error on that line:At the same time, a regular empty Haxe project will compile it just fine.
To Reproduce Just do
trace('живопліт')
at any place in empty Kha project.Execution Environment:
Additional context Looks like
hxcpp-smart-strings
define is disabled in Kha projects. Just adding it tokhafile.js
will not help, it ignores it. Butproject.addCDefine('HX_SMART_STRINGS');
will do the trick and the error with string conversion will disappear.But then I got a new error with pcre2 lib:
I tried to change
PCRE2_CODE_UNIT_WIDTH
define from 8 to 16, but without luck. Also tried 0, as the documentation says:Use 0 for a multi-width application
, but got even more weird C++ errors, and looks like0
is the correct value, but it wants some additional setup for prce2 lib.I'm not really a C++ guy, so not sure how to fix it myself, sorry.