mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-04 14:07:10 +01:00
in libraries to be parsed as if they were the main module block,
which in practice mainly mean that local variables with default
values were never initialisation (mantis #16949)
git-svn-id: trunk@15596 -
22 lines
375 B
ObjectPascal
22 lines
375 B
ObjectPascal
{ %target=win32,win64,wince,darwin,linux,freebsd,solaris,beos}
|
|
{ %needlibrary }
|
|
|
|
program ptest;
|
|
|
|
{$ifdef fpc}{$mode objfpc}{$H+}{$endif fpc}
|
|
|
|
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.
|