You are not logged in.
Pages: 1
when both core.json and core.text in the uses cluase, compiler can not find the right FormatUtf8 func
function FormatUtf8(const Format: RawUtf8; const Args: array of const): RawUtf8; overload;
Last edited by keinn (2021-04-28 03:11:40)
Offline
I don't understand what you meant.
The two signature are different: one with Args and another with Args and Params.
So the compiler can make a difference between the two overloads.
Offline
i'd like to use
xx:=formatUtf8('abc%',[i])
but if the mormot.core.json and mormot.core.text both imported in the unit , u can't do so. it can NOT be compiled .
i had to remove the mormot.core.json use from the unit.
Offline
Which compiler are you using?
I am not able to reproduce it.
There are a lot of places in mORMot where both units are used together, with no problem.
So I guess there is something wrong either with the source code you are using, or you are mixing some units.
Check your project paths - and on FPC use the mormot2.lpk package.
Offline
but if the mormot.core.json and mormot.core.text both imported in the unit , u can't do so. it can NOT be compiled.
Most of my units have both and I am using FormatUtf8 all over the place, no problems at all.
Delphi 10.4.2 W32/W64
Offline
Pages: 1