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

Michael Van Canneyt michael at freepascal.org
Mon Jun 22 09:48:23 CEST 2015

On Mon, 22 Jun 2015, Tomas Hajny wrote:

> On Mon, June 22, 2015 00:24, fredvs wrote:
> .
> .
>>> So LD_PRELOAD and LD_LIBRARY_PATH are unix only ?
>>> What about Windows, what should be the TProcess.Environment.Text ?
>> => not OK.
> I'm not aware of an equivalentof LD_PRELOAD on Windows.
> As far as LD_LIBRARY_PATH is concerned - as far as I know, MS Windows
> search for dynamic libraries on PATH (i.e. the same environment variable
> is used for both binaries and their libraries). You might want to be
> careful, retrieve the original value using GetEnvironmentVariable and
> extend it with potential additional paths as necessary rather than just
> replacing the original value completely.

The same is true for the environment as a whole. 
Most unix environments expect at least PATH, TMP and some others to be set.

So I would rather use .add() instead of setting .text


More information about the fpc-pascal mailing list