mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 07:59:34 +01:00 
			
		
		
		
	when linked to FPC-compiled programs under linux/i386 which
    do not use libc + test (mantis #8730). Programs which do use
    libc and other linux targets have to be fixed in a similar
    way until we properly fix everything by not exporting
    any symbols at all from shared libraries by default (and
    only those appearing in the "exports" section).
    Finalisation does not work yet either for FPC-compiled
    programs on linux/anything.
git-svn-id: trunk@10495 -
		
	
			
		
			
				
	
	
		
			47 lines
		
	
	
		
			684 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			684 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
{$mode delphi}
 | 
						|
 | 
						|
{$ifdef darwin}
 | 
						|
{$PIC+}
 | 
						|
{$endif darwin}
 | 
						|
 | 
						|
{$ifdef CPUX86_64}
 | 
						|
{$ifndef WINDOWS}
 | 
						|
{$PIC+}
 | 
						|
{$endif WINDOWS}
 | 
						|
{$endif CPUX86_64}
 | 
						|
unit uw8730b;
 | 
						|
 | 
						|
interface
 | 
						|
 | 
						|
function Lib2Func: pchar; CDecl;
 | 
						|
 | 
						|
implementation
 | 
						|
 | 
						|
const
 | 
						|
{$ifdef windows}
 | 
						|
  alibname='tw8730a.dll';
 | 
						|
{$else}
 | 
						|
  alibname='tw8730a';
 | 
						|
  {$linklib tw8730a}
 | 
						|
{$endif}
 | 
						|
 | 
						|
function Lib1Func: pchar; external alibname name '_Lib1Func';
 | 
						|
 | 
						|
function Lib2Func: pchar;
 | 
						|
begin
 | 
						|
  Writeln( Lib1Func );
 | 
						|
  result := 'result of function Lib2Func';
 | 
						|
end;
 | 
						|
 | 
						|
var
 | 
						|
  t: text;
 | 
						|
initialization
 | 
						|
assign(t,'tw8730b.txt');
 | 
						|
rewrite(t);
 | 
						|
close(t);
 | 
						|
WriteLn( 'Init of Unit 2' );
 | 
						|
 | 
						|
end.
 | 
						|
 | 
						|
//= END OF FILE ===============================================================
 |