fpc/tests/webtbs/tw8730c.pp
florian 8b48127b2c * as shared libraries without glibc on linux currently don't work, link those tests
on current fpc versions and linux always against glibc, so the shared library handling is tested
2024-09-19 22:57:45 +02:00

40 lines
826 B
ObjectPascal

{ %target=win32,win64,wince,darwin,linux,freebsd,solaris,beos,aix,android,haiku }
{ %NEEDLIBRARY }
{$mode delphi}
program MainApp;
uses
sysutils
{$if (FPC_FULLVERSION<=30301) and defined(linux)}
,initc
{$endif (FPC_FULLVERSION<=30301) and defined(linux)}
;
const
{$ifdef windows}
libname='tw8730b.dll';
{$else}
libname='tw8730b';
{$linklib tw8730b}
{$endif}
function Lib2Func: pchar; CDecl; external libname name 'Lib2Func';
var
error: byte;
begin
error:=0;
WriteLn( Lib2Func );
if not(fileexists('tw8730a.txt')) or
not(fileexists('tw8730b.txt')) then
error:=1;
if (fileexists('tw8730a.txt')) then
deletefile('tw8730a.txt');
if (fileexists('tw8730b.txt')) then
deletefile('tw8730b.txt');
if error<>0 then
writeln('tw8730c did not complete successfully');
halt(error);
end.