[Libpqxx-general] Please help compiling libpqxx on win32
Jeroen Vermeulen
jtv at xs4all.nl
Tue Jun 10 16:20:23 UTC 2008
Taras Kopets wrote:
> E:\tools\libs\libpqxx-2.6.9>make -f win32\MinGW.mak
> win32\MinGW.mak:17: "win32/common": Invalid argument
> make: *** No rule to make target `"win32/common"'. Stop.
Did you create that file like the README says?
Also, be sure to try the 3.0 snapshots. Windows support is improving!
> I manually edited configure file (because it said it couldn't find my
> header and lib folder using pg_config) and after moving of postgres
No need to edit the configure script! Just make sure pg_config is in
your command execution path somewhere.
> header files and lib directory to command line friendly place (path with
> no spaces). I also moved appropriate header files as suggested in
> install.txt in win32 folder (however there is no header for
> postgresql-8.3). After all this I had errors like "Could not link to
> libpq...". But I didn't stopped at this, I found libpq.dll and copied
> it to lib folder and it compiled! I made make check and after if
> compiled and run those tests almost every test lead to fatal program
> termination and console was all in FAIL output.
I'm sorry it's all so difficult; I don't use this particular platform
myself, and it's not easy to set up remotely etc. We have someone who's
looking into making things work better with Windows and Visual C++, but
the MinGW setup could use some love as well.
> PASS: test002.exe
> FAIL: test003.exe
> Adding trigger...
> Sending notification...
> FAIL: test004.exe
That seems to be because of a trigger notification never arriving. If
it still fails with the 3.0 snapshots, that will need more investigation.
> all referencing different libpq functions.
> After some moving the order of linking libraries I got only a few errors
> that was complaining on *select.*
> libs\libpqxx.a(connection_base.o)||In function
> `ZN45_GLOBAL__N__ZN4pqxx16encrypt_passwordERKSsS1_7wait_fdEibP7timeval':|
> e:\tools\libs\libpqxx-2.6.9\src\connection_base.cxx|1315|undefined
> reference to `select at 20'|
> libs\libpqxx.a(connection_base.o)||In function
> `ZN4pqxx15connection_base12check_resultERKNS_6resultE':|
> e:\tools\libs\libpqxx-2.6.9\src\connection_base.cxx|400|undefined
> reference to `select at 20'|
This one is a bit confusing because "select" is such a frequently-used
word in SQL, but really it's a standard sockets function. This error
means that you need to link to the sockets library for your environment:
in your case I believe that would be ws2_32, but if that doesn't work,
try wsock32 or winsock.
The configure script normally automates all this, of course.
Jeroen
More information about the Libpqxx-general
mailing list