Monday, 08 January 2024
  1 Replies
  192 Visits
Hi, I'm trying to install the latest libraries setup (January 2024), but the setup fails compiling sgcHTTP_OpenAPI_Client.pas on line 515.
I'm using delphi 12 but strangely the compilation directive "D2010" is defined so the code tries to execute the code between {$ELSE} and {$ENDIF}

// convert to UTF8 if enabled
if EncodeBodyAsUTF8 then
aRequest.Body := {$IFNDEF D2010}UTF8Encode(aRequest.Body){$ELSE}aRequest.Body ,TEncoding.UTF8{$ENDIF};

At the moment I solved it by forcing the code to execute the "UTF8Encode(aRequest.Body)" instruction.