mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 09:29:42 +01:00
28 lines
466 B
ObjectPascal
28 lines
466 B
ObjectPascal
{ %target=darwin,linux,freebsd,solaris,beos,haiku,aix }
|
|
{ %NEEDLIBRARY }
|
|
|
|
{$mode delphi}
|
|
program MainApp;
|
|
|
|
uses
|
|
dynlibs,
|
|
Math;
|
|
|
|
const
|
|
{$ifdef windows}
|
|
libname='tw16263a.dll';
|
|
{$else}
|
|
libname = './libtw16263a.'+SharedSuffix;
|
|
{$endif}
|
|
|
|
var
|
|
hdl: TLibHandle;
|
|
begin
|
|
// the library will perform a div-by-zero in its init code
|
|
setexceptionmask([exZeroDivide]);
|
|
hdl := loadlibrary(libname);
|
|
if (hdl=nilhandle) then
|
|
halt(1);
|
|
unloadlibrary(hdl);
|
|
end.
|