Application doesn't seem to work when linked to library lazarus / 32-Linux ---------------------------------------------------------------------- Michael Collier · 2012-01-21 15:30 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. ---------------------------------------------------------------------- Michael Collier · 2012-01-21 15:39 My Bad I think.. I just copied the dll.so file to usr/lib rather than usr/local/lib and it fires up now.. Does lazarus look in usr/local/lib during the compilation stage though, because it didn't give any link errors when I pasted the dll file there? ---------------------------------------------------------------------- Leledumbo · 2012-01-22 14:12 QuoteDoes lazarus look in usr/local/lib during the compilation stage though, because it didn't give any link errors when I pasted the dll file there?It looks for libraries in the (static) linker search path, regardless the location is searched by the (dynamic) linker or not. ---------------------------------------------------------------------- Troodon · 2012-01-22 14:18 Try issuing ldconfig or rebooting your computer after you added a new .so to one of the library folders. ---------------------------------------------------------------------- Michael Collier · 2012-01-22 15:16 Ok thanks guys, I didn't know about ldconfig, have added note to wiki page