On Monday 06 August 2012 21:53:52 Алексей Логинов wrote:
> In Linux language-file must not be in directory with binary file.

It first searches by a regular loadlibrary() call, if the lib can not be found 
in system library directories it checks the directory of the application 
binary:
"
   langlibhandle:= loadlibrary(
                  {$ifndef FPC}pchar({$endif}aname{$ifndef FPC}){$endif});
  {$ifdef UNIX}
   if (langlibhandle = 0) and (fdir = '') then begin
      //try in application dir
    langlibhandle:= loadlibrary({$ifndef FPC}pchar({$endif}
               filedir(sys_getapplicationpath)+aname{$ifndef FPC}){$endif});
   end;
  {$endif}
   if langlibhandle <> 0 then begin
    {$ifdef FPC}pointer({$endif}reglang{$ifdef FPC}){$endif}:=
                  getprocaddress(langlibhandle,registerlangname);
    if {$ifndef FPC}@{$endif}reglang <> nil then begin
     reglang(@registermodule,@registerresourcestrings);
    end;
    result:= true;
   end
   else begin
   {$ifdef FPC} 
    {$ifdef UNIX}
    raise exception.create(dlerror);
    {$else}
    raise exception.create('Library not found.');
    {$endif}
   {$else}
    raise exception.create('Library not found.');
   {$endif}
   end;
  end;
"
> And it's
> problem for transtation units not from current directory.
>
I don't understand.

Martin

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to