QPSQL driver - Postgresql 9 & Windows 7
-
wrote on 2 Apr 2011, 07:32 last edited by
I think you can link against the 64 bit version, but you need to use a 64 bit version of Qt and a 64 bit toolchain for that. I did the same for MySql once, and that worked.
-
wrote on 2 Apr 2011, 07:38 last edited by
That would mean building Qt, right?
I don't see a pre-packaged Qt SDK for Windows 64 available. -
wrote on 2 Apr 2011, 08:07 last edited by
Yes that is correct. You will need to build Qt. It's easy to do though.
-
wrote on 2 Apr 2011, 08:13 last edited by
I've managed to avoid it so far, so it make me nervous [plus I don't know where to start, but google is your friend] :)
I'm guessing I'll be able to build both 32 bit and 64 bit executables from this build, or do I need to hold on to my existing SDK for 32 bit?
-
wrote on 2 Apr 2011, 08:25 last edited by
I think you would be best to build the 64-bit version of Qt in a new directory. That way you can keep your existing 32-bit install working. They can live perfectly happy side by side. So in the end you coudl have dirs like this:
@
C:\Qt\4.7.2-x86
C:\Qt\4.7.2-x64
@or whatever you choose to name the directories as. Then to build against one or the other just be sure to use the corresponding version of qmake form within the appropriate directory.
There should be plenty of docs on how to configure and build Qt on Windows both in the official Qt docs and on devnet.
-
wrote on 25 Mar 2013, 22:38 last edited by
've solved the problem, I'm in the same.
-
wrote on 28 Mar 2013, 00:36 last edited by
GCC 32bit requires 32bit postgres.
-
wrote on 1 Apr 2013, 10:41 last edited by
You will need to compile the drivers, then you will get into plugin Qt dir the files libqsqlpsql.so and or qsqlpsql4.dll if windows, then the files libpq.so, libpq.so.5 and libpq.so.5.4 sould go to your lib folder ex(/usr/lib).
-
wrote on 11 Apr 2013, 20:28 last edited by
mingw compile postgres with fixed and so the driver can generate.
-
wrote on 7 May 2013, 07:38 last edited by
I have x32 postgres 9.2
I try make QPSQL driver, and receive this error. ????@C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEP
ATH+=C:\PostgreSQL\9.2\include" "LIBS+=C:\PostgreSQL\9.2\lib\libpq.a" psq
l.pro
Qt: Untested Windows version 6.2 detected!C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\psql>make
make -f Makefile.Debug
make[1]: Entering directoryC:/QtSDK/QtSources/4.8.1/src/plugins/sqldrivers/psq l' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT - DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB - DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_TH READ_SUPPORT -I"c:\QtSDK\Symbian\SDKs\Symbian1Qt473\include\QtCore" -I"c:\QtSDK\ Symbian\SDKs\Symbian1Qt473\include\QtSql" -I"c:\QtSDK\Symbian\SDKs\Symbian1Qt473 \include" -I"c:\PostgreSQL\9.2\include" -I"c:\Program" -I"Files\PostgreSQL\9.2\i nclude" -I"c:\QtSDK\Symbian\SDKs\Symbian1Qt473\include\ActiveQt" -I"debug" -I"c: \QtSDK\Symbian\SDKs\Symbian1Qt473\mkspecs\default" -o debug\main.o main.cpp g++: CreateProcess: No such file or directory make[1]: *** [debug/main.o] Error 1 make[1]: Leaving directory
C:/QtSDK/QtSources/4.8.1/src/plugins/sqldrivers/psql
'
make: *** [debug] Error 2@ -
wrote on 1 Jun 2013, 21:12 last edited by
after i run C:[Qt dir]\Src\qtbase\src\plugins\sqldrivers\psql>mingw32-make
i get this error:
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory 'C:/Qt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/
sqldrivers/psql'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W
all -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCE
PTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"C:\program" -
I"files\postgresql\9.2\include" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include" -I"C:
\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\in
clude\QtSql\5.0.2" -I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtSql\5.0.2\QtSql"
-I"C:\Qt\Qt5.0.2\5.0.2\mingw47_32\include\QtCore" -I".moc\release_shared" -I"..
......\mkspecs\win32-g++" -o .obj\release_shared\qsql_psql.o ......\sql\driv
ers\psql\qsql_psql.cpp
......\sql\drivers\psql\qsql_psql.cpp:58:22: fatal error: libpq-fe.h: No such
file or directory
compilation terminated.
Makefile.Release:483: recipe for target '.obj/release_shared/qsql_psql.o' failedmingw32-make[1]: *** [.obj/release_shared/qsql_psql.o] Error 1
mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/s
qldrivers/psql'
makefile:38: recipe for target 'release-all' failed
mingw32-make: *** [release-all] Error 2any idea how to get over? the QPSQL driver is not loaded yet.
-
wrote on 5 Feb 2015, 07:35 last edited by
[quote author="angelicaP" date="1370121154"]
any idea how to get over? the QPSQL driver is not loaded yet. [/quote]Any luck solving the problem?
-
wrote on 5 Feb 2015, 07:35 last edited by
[quote author="angelicaP" date="1370121154"]
any idea how to get over? the QPSQL driver is not loaded yet. [/quote]Any luck solving the problem?