Qt 4.8.5 with PostgreSQL 9.1 !!
-
wrote on 21 Nov 2013, 11:00 last edited by
Hello kindly help...
I have PostgreSQL 9.1 and Qt Designer both are running very fine individually.. Please help me to CONNECT THESE TWO!! Which loaders should i use,why should i do that..how to set the path,where to set etc
-
wrote on 21 Nov 2013, 15:29 last edited by
Hi,
Qt Designer is a UI designer there isn't DB connection.
If you mean how to connect Qt application with DB, read "here":http://qt-project.org/doc/qt-5.1/qtdoc/topics-data-storage.html#sql-support-in-qt for an overview and "here":http://qt-project.org/doc/qt-5.1/qtsql/sql-driver.html#qpsql-for-postgresql-version-7-3-and-above for PostgreSQL related information
-
wrote on 22 Nov 2013, 09:26 last edited by
Following your link, i am not able to do 'nmake'..it gives me fatal error NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\BIN\cl.EXE"' : return code '0x2'
Stop.what is wrong?
-
wrote on 22 Nov 2013, 09:31 last edited by
Wich version of Qt are you using? What Operaing System?
If you're using Windows/MinGW you shall follow Unix instruction to build PSQL driver
-
wrote on 22 Nov 2013, 10:01 last edited by
Qt 4.8.5 .Windows 7 ,64bit. I have been using only Qt designer and i run c++ code on VS2008. I haven't installed Qt Creator yet, is it giving me problem?
Installed MinGW 3.1.0 and tried following this https://sites.google.com/site/qxormpostgres/generar-driver-postgres-qt
got struck in 9yh step,i am not able to generate '.a' files !Please elaborate on this "If you’re using Windows/MinGW you shall follow Unix instruction to build PSQL driver".
-
wrote on 22 Nov 2013, 11:44 last edited by
Hi,
I means "What Qt build are you using"? The answer is Qt-VisualStudio.
You can't mix compiler. You must use VisualStudio.
Anyway, "here":http://msdn.microsoft.com/en-us/library/xsyc3e16(v=vs.110).aspx you can read that return code 0x2 probably means that your Makefile is incorrect.
Is the cl.exe PATH correct?Please post you configuration and the prompt command you used to run qmake
-
wrote on 22 Nov 2013, 12:40 last edited by
I have no idea about this cl.exe !
came up with new issue-
C:\Qt\4.8.5>C:\Qt\4.8.5\src\plugins\sqldrivers\psqlC:\Qt\4.8.5\src\plugins\sqldrivers\psql>qmake Makefile "INCLUDEPATH+=C:/Program
Files/PostgreSQL/9.2/include" "LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a
" psql.pro
i get something like this -c:\Qt\4.8.5\src\plugins\sqldrivers\psql\Makefile:9: Parse Error ('first: debug')
Error processing project file: Makefile
C:\Qt\4.8.5\src\plugins\sqldrivers\psql>
-
wrote on 22 Nov 2013, 14:51 last edited by
-
wrote on 25 Nov 2013, 07:37 last edited by
C:\Qt\4.8.5\src\plugins\sqldrivers\psql>qmake "INCLUDEPATH+=C:/Program Files/Pos
tgreSQL/9.2/include" "LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a" psql.pr
o
Cannot find file: Files\PostgreSQL\9.2\includeö.
Cannot find file: Files\PostgreSQL\9.2\lib\libpq.aô.C:\Qt\4.8.5\src\plugins\sqldrivers\psql>
how to generate this ".a" files?
-
wrote on 25 Nov 2013, 15:07 last edited by
Hi,
as you can see, there is a problem with path containing spaces; try to prefix a '' character to each space.
For example
@
qmake “INCLUDEPATH+=C:/Program\ Files/PostgreSQL/9.2/include” “LIBS+=C:/Program\ Files/PostgreSQL/9.2/lib/libpq.a“ psql.pro@ -
Hi,
The quickest way to avoid problems with LIBS paths on windows is to either avoid using spaces at all or use the 8.3 naming
-
wrote on 26 Nov 2013, 01:43 last edited by
Hi,
to get 8.3 names you can type on Windows Command Prompt
@
dir /X
@
1/12