[Libpqxx-general] Please help compiling libpqxx on win32
Taras Kopets
tkopets at gmail.com
Sun Jun 8 09:41:27 UTC 2008
Hi list!
I want to make libpqxx to work with wxWidgets.
Currently I'm using windows, and want to compile libpqxx with MinGW.
I tried hard to compile it from command line, but it didn't worked it
said me next:
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.
So I tried to do it with MSYS.
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
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.
PASS: test002.exe
FAIL: test003.exe
Adding trigger...
Sending notification...
FAIL: test004.exe
OK, I know something went wrong in compilation, but I tried to put
libpqxx in my wxWindets app (also using MinGW).
At first I got a lot of errors on linking stage like this:
libs\libpqxx.a(connection.o)||In function
`ZN4pqxx13connect_async18do_completeconnectEP7pg_conn':|
e:\tools\libs\libpqxx-2.6.9\src\connection.cxx|142|undefined reference
to `PQconnectPoll'|
libs\libpqxx.a(connection.o)||In function
`ZN4pqxx13connect_async15do_startconnectEP7pg_conn':|
c:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\basic_string.h|44|undefined
reference to `PQconnectStart'|
libs\libpqxx.a(connection.o)||In function
`ZN4pqxx13connect_async15do_startconnectEP7pg_conn':|
...
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'|
||=== Build finished: 2 errors, 0 warnings ===|
Please help me...
Thanks in advance,
Taras Kopets
More information about the Libpqxx-general
mailing list