MBS "PostgreSQL Connect" example

I am trying to use the “PostgreSQL Connect” example but it keeps raising an exception NativeError: 3 with description:

R:\1\libpq.dll: %1 no es una aplicación Win32 válida.

DBMS API Library loading fails
This library is a part of DBMS client installation, not SQLAPI++
Make sure DBMS client is installed and
this required library is available for dynamic loading

The path for the dll is correct and includes all the dll files from “PostgreSQL 11.1.zip”.
Does anybody know what am I missing?

Did you try it with the DLLs in same folder as your application.
Otherwise it may not find the related ones.

Also make sure you didn’t get a mismatch between 32 and 64 bit.

It was the 32bit vs 64bit problem. I was using a 64bit dll and building at 32bit.