[fpc-pascal] Searching for database libraries

Michael Van Canneyt michael at freepascal.org
Sun Dec 9 17:43:46 CET 2012



On Sun, 9 Dec 2012, Mark Morgan Lloyd wrote:

> Marco van de Voort wrote:
>> In our previous episode, Michael Van Canneyt said:
>>>>> Maybe the installer writes something in the registry, in which case you 
>>>>> could try that first.
>>>> There's a problem with this on (at least some versions of) Windows: if 
>>>> you use InitialisePostgres3() it will find libpq.dll but not other 
>>>> libraries such as ssleay. A workable hack appears to be to cd to the 
>>>> directory that contains the DLLs before attempting to establish the 
>>>> database connection.
>>> I consider this an installation problem, not something that must be 
>>> catered for in FPC.
>> 
>> That's what I thought too. They are installed in a way that they are only
>> easily usable via odbc.
>> 
>> Anyway, a workaround could be to try to add the filedir of the dll found 
>> via
>> the registry to the path. (on shell level, not FPC rtl level)
>
> Does Windows use the standard path for searching DLLs?

Yes, after the current working directory, and possibly the location of the binary itself.

Michael.



More information about the fpc-pascal mailing list