Hi, When I link to an external library "dll.so" my calling application doesn't appear to do anything (no forms appear or anything, but no error messages either).
I have used libraries with success in Windows & Mac, and even tried a really simple test (below):
I must have missed something??
The DLL ( copied to usr/local/lib )
library DLL;
{$mode objfpc}{$H+}
uses
cmem
{$IFDEF UNIX}{$IFDEF UseCThreads}
,cthreads
{$ENDIF}{$ENDIF}
,Interfaces ,Forms ;
{$R *.res}
procedure test(); cdecl ;
begin
end ;
exports
test ;
begin
Application.Initialize;
end.
The Calling Program (simply declares the external procedure and creates a form, but the form never appears, if I remove the external declaration then it runs OK)
program call;
{$mode objfpc}{$H+}
uses
cmem ,
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, Forms;
const dll = 'libdll' ;
procedure test() ; cdecl; external dll ;
{$R *.res}
var form : TForm ;
begin
RequireDerivedFormResource := True;
Application.Initialize;
form := TForm.Create(Application);
form.Show;
Application.Run;
end.