PDA

View Full Version : problems with building psql



szisziszilvi
28th March 2011, 13:42
Hi!

I'm trying build the psql driver on Windows XP. I follow the description found here: http://doc.trolltech.com/4.3/sql-driver.html#qpsql-for-postgresql-version-7-3-and-above

It says only this:
Install the PostgreSQL developer libraries. Assuming that PostgreSQL was installed in C:\psql, build the plugin as follows:

cd %QTDIR%\src\plugins\sqldrivers\psql
qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
nmake

Here is what I've done:
-----------------------------------------------------------------------------
The PostgreSQL has been installed. here: C:\Program Files\PostgreSQL\9.0
I opened a Qt COmmand Prompt, Cd-d here: C:\Qt\2010.05\qt\src\plugins\sqldrivers\psql\
Here I'm trying to build the project like this:
C:\Qt\2010.05\qt\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=C:\
Program Files\PostgreSQL\9.0\include" "LIBS+=C:\Program Files\PostgreSQL\9.0\lib
\libpq.lib" psql.pro

But I get these warning messages:
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.

Where is the problem now? After this the mingw32-make does not work, the result is several errors about undeclared things. I'm not using nmake because when I had problems with installing qwt the solution was to use mingw32-make instead, so I thought this should work in this case too, I think nmake is not on my computer now (it used to be, but the coputer has been reinstalled).

Szilvi

schnitzel
28th March 2011, 18:06
There are spaces in the paths:


C:\Qt\2010.05\qt\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=C:\
Program Files\PostgreSQL\9.0\include" "LIBS+=C:\Program Files\PostgreSQL\9.0\lib
\libpq.lib" psql.pro


Instead, try copying include files and libs to c:\psql.

szisziszilvi
29th March 2011, 09:06
the result is the same:
C:\Qt\2010.05\qt\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.

As there is no "ms" library in my file system under lib, I also tried
C:\Qt\2010.05\qt\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\libpq.lib" psql.pro
but the result is the very same.

Added after 20 minutes:

wow:)
The solution was is here:
http://www.qtcentre.org/threads/31038-can-t-build-plugin-QDB2-for-IBM-DB2?p=158157#post158157

no warning messages and mingw32-make worked.
Off to try to connect to that database. :)