mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 10:38:14 +02:00

on current fpc versions and linux always against glibc, so the shared library handling is tested
28 lines
539 B
ObjectPascal
28 lines
539 B
ObjectPascal
{ %target=win32,win64,wince,darwin,linux,freebsd,solaris,beos,aix,android,haiku }
|
|
{ %needlibrary }
|
|
{ %delfiles=tw16949a }
|
|
|
|
program ptest;
|
|
|
|
{$ifdef fpc}{$mode objfpc}{$H+}{$endif fpc}
|
|
|
|
{$if (FPC_FULLVERSION<=30301) and defined(linux)}
|
|
uses
|
|
initc;
|
|
{$endif (FPC_FULLVERSION<=30301) and defined(linux)}
|
|
|
|
const
|
|
{$if defined(windows) or defined(mswindows)}
|
|
libname='tw16949a.dll';
|
|
{$else}
|
|
libname='tw16949a';
|
|
{$linklib tw16949a}
|
|
{$ifend}
|
|
|
|
function foo: LongInt; cdecl; external libname;
|
|
|
|
begin
|
|
if foo<>12345 then
|
|
halt(1);
|
|
end.
|