Hi i think you are busy?? i sent the result after executing your specified instruction. What should i do. I am waiting for your reply
Regards,
Narasimha Raju. Naidu
Hi i think you are busy?? i sent the result after executing your specified instruction. What should i do. I am waiting for your reply
Regards,
Narasimha Raju. Naidu
Problem is with spaces in Yours PostgreSQL dir name (c:\Program Files\PostgreSQL\8.3). Try this :
Look at differently located char " in INCLUDEPATH and LIBS.Qt Code:
qmake INCLUDEPATH+="C:\Program Files\Pos tgreSQL\8.3\include" LIBS+="c:\Program Files\PostgreSQL\8.3\lib\libpq.a" psql.pr oTo copy to clipboard, switch view to plain text mode
Hi,
Good Morning, Thanks for your reply. I did changes what you mentiond in ur reply. I got the following output.
C:\Qt\4.3.4\src\plugins\sqldrivers\psql>qmake INCLUDEPATH="c:\Program Files\Post
greSQL\8.3\include" LIBS+="c:\Program Files\PostgreSQL\8.3\lib\libpq.a" psql.pro
C:\Qt\4.3.4\src\plugins\sqldrivers\psql>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Qt/4.3.4/src/plugins/sqldrivers/psql'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\4.3.4\plugins\sqldrivers\
libqsqlpsql4.a -o ..\..\..\..\plugins\sqldrivers\qsqlpsql4.dll tmp/obj/release_s
hared/main.o tmp/obj/release_shared/qsql_psql.o tmp/obj/release_shared/moc_qsql_
psql.o -L"c:\Qt\4.3.4\lib" -L"c:\Qt\4.3.4\lib" tmp\obj\release_shared\qsqlpsql_
resource_res.o c:\Program Files\PostgreSQL\8.3\lib\libpq.a -lQtSql4 -lQtCore4
g++: c:\Program: No such file or directory
g++: Files\PostgreSQL\8.3\lib\libpq.a: No such file or directory
mingw32-make[1]: *** [..\..\..\..\plugins\sqldrivers\qsqlpsql4.dll] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.3.4/src/plugins/sqldrivers/psql'
mingw32-make: *** [release] Error 2
I am waiting for your reply.
Regards,
Narasimha Raju. Naidu
reinstall PostgreSQL in other directory which will not contain any spaces and reapeat all steps again. now the problem only in paths with spaces.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Thanks for your reply. According to ur instructions i did the same thing. I got the following output
C:\MinGW\bin>dlltool --dllname libpq.dll --def libpq.def --output-lib libpq.a
dlltool: Can't open def file: libpq.def
C:\MinGW\bin>
Waiting for your reply
Regards,
Narasimha Raju. Naidu
read the post #13 and read Creating .def Files from DLLs section from specified link.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Thanks for your reply. According to your instructions
I tried to downolad impdef.exe but i got an error file not found error.
Waiting for your reply
Regards,
Narasimha Raju. Naidu
try this or direct link
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Thanks for your reply.
I downloaded required file and executed the command. it generated one file. where should i keep this .def file
it contains "Couldn't open file with CreateFile()"
waiting for your reply.
Regards,
Narasimha Raju. Naidu
Hi,
i did one thing, i copied the downloaded file into postgre lib directory and executed the command and it generated one file with some text.
what should i do now. where should i keep newly generated file
Waiting for your reply
Regards,
Narasimha Raju. Naidu
looks like you don't want to read links which I've posted. all instructions which I've posted are enought for successful building PSQL driver.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
No not like that. Just i am confirming what i need to do.
Regards,
Narasimha Raju. Naidu
I successfully generated libpq.a file
libpq.a file is at MinGW\bin. Is it the right place to keep or i need to move some where else
Dont feel bad, I am in full pressure of my TL.
Regards,
Narasimha Raju. Naidu
Hi,
I run the following commands and i got the following result.
C:\Qt\4.3.4>cd src\plugins\sqldrivers\psql
C:\Qt\4.3.4\src\plugins\sqldrivers\psql>qmake INCLUDEPATH+="e:\ProgramFiles\Post
greSQL\8.3\include" LIBS+="e:\ProgramFiles\PostgreSQL\8.3\lib\libpq.a" psql.pro
C:\Qt\4.3.4\src\plugins\sqldrivers\psql>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Qt/4.3.4/src/plugins/sqldrivers/psql'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\4.3.4\plugins\sqldrivers\
libqsqlpsql4.a -o ..\..\..\..\plugins\sqldrivers\qsqlpsql4.dll tmp/obj/release_s
hared/main.o tmp/obj/release_shared/qsql_psql.o tmp/obj/release_shared/moc_qsql_
psql.o -L"c:\Qt\4.3.4\lib" -L"c:\Qt\4.3.4\lib" tmp\obj\release_shared\qsqlpsql_
resource_res.o e:\ProgramFiles\PostgreSQL\8.3\lib\libpq.a -lQtSql4 -lQtCore4
Creating library file: c:\Qt\4.3.4\plugins\sqldrivers\libqsqlpsql4.a
mingw32-make[1]: Leaving directory `C:/Qt/4.3.4/src/plugins/sqldrivers/psql'
C:\Qt\4.3.4\src\plugins\sqldrivers\psql>
I think it successfully generated driver, but i did not get where it generated. If it generated driver where it will located.
What are the steps i need to do to run successfully my application.
Regards,
Narasimha Raju. Naidu
look at QTDIR/plugins/sqldrivers. try to run QTDIR/demos/sqlbrowser.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Hi,
Thanks for your help. After running my application i got the following output.
E:\qt\kk>ruby iccms_main.rb
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
QSqlQuery::exec: database not open
Tue Feb 24 2009
####
Tue Feb 24 2009
$$$$
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is s
till in use, all queries will cease to work.
QSqlDatabasePrivate::addDatabase: duplicate connection name 'qt_sql_default_conn
ection', old connection removed.
Failed to open connection
i am at Dbase
i am busy with Systems
QSqlQuery::exec: database not open
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is s
till in use, all queries will cease to work.
QSqlDatabasePrivate::addDatabase: duplicate connection name 'qt_sql_default_conn
ection', old connection removed.
Regards,
Narasimha Raju. Naidu
put sqldrivers dir with your executable.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Hi,
Sorry to say, still i am getting the same error.
Regards,
Narasimha Raju. Naidu
Hi,
Sorry for my late reply. from last two weeks i am out of station. After comming back i completly worked on new system and installed all softwares and database. Then after i opend your replies on this site and followed all the instructions. After few hours i sucessfully created psqlqsql4.dll and libqsqlpsql4.a files at c:\Qt4\4.3.4\plugins\sqldrivers along with qsqlite4.dll and qsqlodbc4.dll.
But still i am getting the same error what before i got. What should i do now. I copied all the dlls in to my working directory but still i am getting the same error.
Waiting for your reply.
Regrads,
Narasimha Raju
Bookmarks