I did a mistake. I used the x64 libraries from postgresql. I download and use the x32 libraries (postgresql-9.2.7-1-windows-binaries.zip) and I can export the definitions of libpq.dll (x32)
But when I run the application, it fails: Says: The application was unable to start correctly (0xc000007b). Click OK to close the application.
Then I remember that you says that is needed the libintl.dll.
Using CFF Explorer I found that libpq.dll import libintl.dll
I get the libintl.dll from the bin folder (postgresql-9.2.7-1-windows-binaries\pgsql\bin)
But, when I run the compiled I get the same error message. Then with CFF Explorer I look the imports of libpq.dll and I found some dll that are present in my Windows\system32 folder, but that also are distributed in the bin folder (postgresql-9.2.7-1-windows-binaries\pgsql\bin), and I compare and it are differents.
That was the case of libeay32.dll and ssleay32.dll
Then I put in the same folder of my compiled test program the following dlls from the bin folder (postgresql-9.2.7-1-windows-binaries\pgsql\bin):
And now works.