From 07c015803d2e4d6ce617695e20ee06d68dd9acf8 Mon Sep 17 00:00:00 2001 From: turborium Date: Sat, 11 Nov 2023 15:16:52 +0400 Subject: [PATCH] fix lazarus support in test --- Pascal/Test/MainUnit.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Pascal/Test/MainUnit.pas b/Pascal/Test/MainUnit.pas index ed6661e..abe2aeb 100644 --- a/Pascal/Test/MainUnit.pas +++ b/Pascal/Test/MainUnit.pas @@ -864,7 +864,11 @@ procedure DoRunTests(); Writeln('Bad -dll param!'); exit; end; + {$IFDEF FPC} + dll_pure_parse_float_library := LoadLibrary(PAnsiChar(AnsiString(DllName))); + {$ELSE} dll_pure_parse_float_library := LoadLibrary(PWideChar(DllName)); + {$ENDIF} if pure_parse_float_library = 0 then begin Writeln('Can''t open "' + DllName + '" dll!'); @@ -882,7 +886,11 @@ procedure DoRunTests(); Writeln('Bad -function param!'); exit; end; + {$IFDEF FPC} + @dll_pure_parse_float := GetProcAddress(dll_pure_parse_float_library, PAnsiChar(AnsiString(DllFunctionName))); + {$ELSE} @dll_pure_parse_float := GetProcAddress(dll_pure_parse_float_library, PWideChar(DllFunctionName)); + {$ENDIF} if @dll_pure_parse_float = nil then begin Writeln('Can''t load function "' + DllFunctionName + '" from dll!');