Hello Marco,
Thanks for your answer. I have tried your suggestion. In fact, there is no more chance to get to the library by proceding manually than there are by letting the system load this library automatically. So the result is exactly the same, apart of that the error message appears when I compile the Initialization Unit (Unit2 in my proto).
In parallel to these tests I have installed Lazarus + fpc in Ubuntu on a VM and tried to build the same exemple as on OSX. It worked perfectly as soon as I had installed Postgres, wich brings the library (with another extension). So, in general the loading mechanism seems to work, but there is for sure a problem on MacOS : today I have cleaned my original installation and re-installed the new packages with Lazarus 1.8.4, the problem is still present.
It is highly frustrating, because if I do something with Lazarus/fpc it will have to run on a Mac along with Postgres, not on Ubuntu.
But, a question : Could it be a mismatch in the bitsize of the library, since Lazarus is built in 32 bits on the Mac and Postgres is 64 bits ?
If yes, do you have any idea on how to build this library ? From the Postgres sources ?
Hoping to read from you,
Thierry