Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt 4.8.5 with PostgreSQL 9.1 !!
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
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
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'
what is wrong?
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
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".
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
I have no idea about this cl.exe !
came up with new issue-
C:\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
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
@qmake Makefile “INCLUDEPATH+=C:/Program Files/PostgreSQL/9.2/include” “LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a “ psql.pro
delete Makefile word
qmake “INCLUDEPATH+=C:/Program Files/PostgreSQL/9.2/include” “LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a“ psql.pro
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
Cannot find file: Files\PostgreSQL\9.2\includeö.
Cannot find file: Files\PostgreSQL\9.2\lib\libpq.aô.
how to generate this ".a" files?
as you can see, there is a problem with path containing spaces; try to prefix a '' character to each space.
qmake “INCLUDEPATH+=C:/Program\ Files/PostgreSQL/9.2/include” “LIBS+=C:/Program\ Files/PostgreSQL/9.2/lib/libpq.a“ psql.pro@
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
to get 8.3 names you can type on Windows Command Prompt