libpq 32 and 64 lazarus / 16-Databases ---------------------------------------------------------------------- fpcoder · 2015-01-01 22:08 Here's what I have on this computer, and it works fine: Postgres 64 - Lazarus 64 trunk - Windows 7 64 Problem is, also Lazarus 32 is now installed and when a 32 bit app starts, there is an error: Code: [Select]Can not load PostgreSQL client library "libpq.dll". Check your installation. So a 32 bit libpq.dll is needed? But how? Postgres 64 is already installed and in the path. Anyway I downloaded "postgresql-9.3.5-1-windows-binaries.zip" and followed the instructions: "Normally you do not need to install any of the client files. You should place the libpq.dll file in the same directory as your applications .EXE-file." Still the same error message. :-I ---------------------------------------------------------------------- howardpc · 2015-01-01 22:39 Do the 32-bit and 64-bit .dlls have the same name? Windows has thunking magic to distinguish them, but perhaps Lazarus does no check of the bitness for which they were compiled, relying just on the name? ---------------------------------------------------------------------- fpcoder · 2015-01-01 23:42 Yes, the DLL's have the same name both for 32 and 64 bit. I installed the 32bit version of pgAdmin, which contains all needed DLL's, and put the pgAdmin dir in the path. It worked! Even though the names of the DLL's are the same, the right ones are used. Now I can switch freely between Lazarus 64 and 32 without thinking of these files. Thanks for the advice Howard!