QPSQL driver - Postgresql 9 & Windows 7
-
That would mean building Qt, right?
I don't see a pre-packaged Qt SDK for Windows 64 available. -
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?
-
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.
-
-
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@ -
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.