Rebuild of QtSql*
-
Hi all,
I had assumed that this question had been asked many times before but searching finds nothing, either that or my search criterion is wrong, so my apologies in advance if this is the case.
I want to add PostgreSQL support to my QtSql* libraries but don't want (nor need) to rebuild all of the others is there a way this library can be rebuilt in a stand-alone manner?
--
William -
Sorry Sigrid I don't have a psql directory in /Qt/4.7.2/plugins/sqldrivers/ or any other for that matter all I have is qsqlite* files. Or am I missing something?
My present QtSql is built using x64 Intel compiler with qsqlite and odbc support I simply want to add psql to this as well.
--
William -
Yes, I am aware of this, but that will rebuild everything won't it? I don't really want (or think I need) to do this. I was simply wanting to rebuild the QtSql library with psql support. Are you telling me there is no way to rebuild a single library and I have to rebuild all?
-
Hi Sigrid,
I tried your suggestion and it looked promising but compilation stopped saying it cannot find "pg_config.h" and on searching the hard disk the only files I have are:
"pg_config.h.in" and "pg_config.h.win32" in the postgresql-9.0.4/src/include directories.
So I now have a ! above my head.
Of course it may help if I actually build the client first.
-
-
It's not enough to install PostgreSQL and then call the nmake. You have to tell the compiler where PostGreSQL has its header and libs.
Install http://www.postgresql.org/download/windows "One click installer" to any 64 Bit Windows machine, it includes libs and headers. Extract the lib and include folders to your dev machine. Then run configure again and add -qt-sql-psql and the include/lib pathes.
Configure created the missing qmake files, there is no need to run all again, go to /%qtdir%/src/plugins/sqldrivers/psql and run "nmake", now your 64 Bit Plugins should be created...And it works with VS 2010 ! You only have to set the correct mkdefs....
Regards,
Peter -
Hi,
Well I downloaded the installer as suggested by peter999 and I used the
@
qmake "sql-drivers += psql"
nmake
@ as suggested by Sigrid and all went well I got a new QtSql4 .dll and .lib files however when I rebuilt an existing application that uses this library it crashed at startup! I've since done the reverse of Sigrid's suggestion and again rebuilt the application, this time it ran as expected.I don't want to waste anyones time with this it can wait until I upgrade to a new SDK.