fpc/tests/webtbs/tw8730c.pp
Jonas Maebe b4d59bf0fb + test for previous commit with main program linking to libc
(apparently already works after all :)

git-svn-id: trunk@10496 -
2008-03-15 23:53:55 +00:00

34 lines
619 B
ObjectPascal

{ %target=win32,win64,wince,darwin,linux,freebsd,solaris,beos}
{ %NEEDLIBRARY }
{$mode delphi}
program MainApp;
uses
sysutils;
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');
halt(error);
end.