[fpc-pascal] Multipe path in TProcess.Environment ?

Tomas Hajny XHajT03 at hajny.biz
Sun Jun 21 23:07:14 CEST 2015


On Sun, June 21, 2015 22:55, fredvs wrote:
> Hello.
>
> If a TProcess runs a executable who needs a library, that does the trick
> =>
> TProcess.Environment.Text := 'LD_PRELOAD='/the/directory/of/thelibrary.so'
> ;
>
> You may also use this => (it seems bad ;-( =>
> http://xahlee.info/UnixResource_dir/_/ldpath.html ) =>
> TProcess.Environment.Text := 'LD_LIBRARY_PATH=/the/path/of/library'
>
> But what if multiple libraries are needed ?
> I have try with =>
> TProcess.Environment.Text :=
> 'LD_PRELOAD=/the/directory/of/thelibrary1.so;/the/directory/of/thelibrary2.so'
> ;
> But without luck.
 .
 .

Unix uses a colon as path delimiter, not semicolon. I don't know about
LD_PRELOAD, but it should work at least for LD_LIBRARY_PATH.

Tomas





More information about the fpc-pascal mailing list