sternocera
asked on
Testing libpqxx, the C++ wrapper for libpq, the PostgreSQL C API.
I've compiled the libpqxx test applications for win32. I realise this is a fairly esoteric question, but maybe one of you will have the answer: what arguments should I pass to test001.exe to supply a database password? I'm getting this output:
C:\libpqxx-2.6.9\TestStati cRelease>t est001.exe
Exception: fe_sendauth: no password supplied
Thanks
C:\libpqxx-2.6.9\TestStati
Exception: fe_sendauth: no password supplied
Thanks
You should start out with http://www.postgresql.org/docs/7.3/static/client-authentication.html ("Client Authentication") to configure the DB first.
ASKER
I can connect to the db using the supplied gui tool. This test program just establishes whether you have the statically linked library working (I compiled the program, which uses the static library which I also compiled). It's just a test.
So what is the code for the test tool?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thats very useful clockwatcher, thanks. One other thing. I cannot get libpq to compile a debug version, just a release, so I've copied the release folder, renamed it debug and appended a "d" to each of the dlls/libs. This is a sleazy hack that I'd rather do without.
The libpqxx documentation advises that if you cannot build a debug, change the common file so that it points to release as release and release as debug. However, it looks for the actual debug folder anyway at some point (as appose to looking for the folder I *told* it was the debug folder, release), so this peice of advice wasn't very well thought through. How can I build the debug to satisfy this requirement properly? I've built the release in the standard way, "nmake /f win32.mak" as outlined in http://developer.postgresql.org/pgdocs/postgres/x19700.html .
Thanks Again,
Sternocera
The libpqxx documentation advises that if you cannot build a debug, change the common file so that it points to release as release and release as debug. However, it looks for the actual debug folder anyway at some point (as appose to looking for the folder I *told* it was the debug folder, release), so this peice of advice wasn't very well thought through. How can I build the debug to satisfy this requirement properly? I've built the release in the standard way, "nmake /f win32.mak" as outlined in http://developer.postgresql.org/pgdocs/postgres/x19700.html .
Thanks Again,
Sternocera
ASKER
Clockwatcher,
I've decided to make this a seperate question, for the sake of clarity for others who may read these posts a later time: https://www.experts-exchange.com/questions/22751602/Getting-PostgreSQL's-C-API-libpq-to-compile-release-and-debug-versions.html
Thanks
I've decided to make this a seperate question, for the sake of clarity for others who may read these posts a later time: https://www.experts-exchange.com/questions/22751602/Getting-PostgreSQL's-C-API-libpq-to-compile-release-and-debug-versions.html
Thanks