Results 1 to 20 of 32

Thread: QPSQL driver in windows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation QPSQL driver in windows

    I tried compile the QPSQL driver but it returns a lot of errors:

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=C:\Arqui
    vos de programas\PostgreSQL\8.2\include" "LIBS+=C:\Arquivos de programas\Postgre
    SQL\8.2\lib\ms\libpq.lib" psql.pro

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>make
    mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN
    -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -
    I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\inclu
    de\QtSql" -I"..\..\..\..\include" -I"c:\Arquivos" -I"de" -I"programas\PostgreSQL
    \8.2\include" -I"c:\Qt\4.3.2\include\ActiveQt" -I"tmp\moc\release_shared" -I"."
    -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\release_shared\qsql_psql.o ..\..\..
    \sql\drivers\psql\qsql_psql.cpp
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:52:22: libpq-fe.h: No such file or direc
    tory
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `QSqlError qMakeError(const
    QString&, QSqlError::ErrorType, const QPSQLDriverPrivate*)':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:142: error: `PQerrorMessage' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:142: error: (Each undeclared identifier
    is reported only once for each function it appears in.)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `bool QPSQLResultPri
    vate:rocessResults()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:152: error: `PQresultStatus' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:153: error: `PGRES_TUPLES_OK' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:156: error: `PQntuples' undeclared (firs
    t use this function)

    ....

    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLD
    river::isOpen() const':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:941: error: `PQstatus' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:941: error: `CONNECTION_OK' undeclared (
    first use this function)
    mingw32-make[1]: *** [tmp\obj\release_shared\qsql_psql.o] Error 1
    mingw32-make[1]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    mingw32-make: *** [release] Error 2

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>

    I didn't understand!! I did all qt help instructions!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPSQL driver in windows

    Notice the difference:
    Quote Originally Posted by brevleq View Post
    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=C:\Arqui
    vos de programas\PostgreSQL\8.2\include"
    "LIBS+=C:\Arquivos de programas\Postgre
    SQL\8.2\lib\ms\libpq.lib" psql.pro

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>make
    mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    -DQT_NO_CAST_TO_ASCII -DQT_ NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN
    -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -
    I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\inclu
    de\QtSql" -I"..\..\..\..\include" -I"c:\Arquivos" -I"de" -I"programas\PostgreSQL
    \8.2\include"
    -I"c:\Qt\4.3.2\include\ActiveQt" -I"tmp\moc\release_shared" -I"."
    -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\release_shared\qsql_psql.o ..\..\..
    \sql\drivers\psql\qsql_psql.cpp
    So try:
    qmake -o Makefile "INCLUDEPATH+=\"C:\Arquivos de programas\PostgreSQL\8.2\include\"" "LIBS+=\"C:\Arquivos de programas\PostgreSQL\8.2\lib\ms\libpq.lib\"" psql.pro
    J-P Nurmi

  3. #3
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Re: QPSQL driver in windows

    With this qmake I can't start neither the compilation:


    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=\"C:\Arq
    uivos de programas\PostgreSQL\8.2\include\"" "LIBS+=\"C:\Arquivos de programas\P
    ostgreSQL\8.2\lib\ms\libpq.lib\"" psql.pro

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>make
    mingw32-make -f Makefile.Release
    Makefile.Release:321: *** multiple target patterns. Stop.
    mingw32-make[1]: Entering directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    mingw32-make[1]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    mingw32-make: *** [release] Error 2

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPSQL driver in windows

    Search the forums for "multiple target patterns", please.
    J-P Nurmi

  5. #5
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPSQL driver in windows

    I searched in google but I didn't found anything that could help me!!

    Don't you have the compiled driver??

    If you have, could you send me??

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPSQL driver in windows

    Quote Originally Posted by brevleq View Post
    I searched in google but I didn't found anything that could help me!!
    I meant searching Qt Centre forums. Look, there's a "Search" item in the link bar on top of every page. There have been a bunch of similar "multiple target patterns" problems lately and I'm quite sure this is the same problem.

    Don't you have the compiled driver??

    If you have, could you send me??
    I'm sorry I'm afraid I don't.
    J-P Nurmi

  7. #7
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: QPSQL driver in windows

    Hey JPN!!
    I tryied something that maybe could solve the problem!!
    I reinstalled postgre in C:\psql consequently the qmake command is:

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=C:\psql\
    include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro

    C:\Qt\4.3.2\src\plugins\sqldrivers\psql>make
    mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory `C:/Qt/4.3.2/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.2\plugins\sqldrivers\
    libqsqlpsql4.a -o "..\..\..\..\plugins\sqldrivers\qsqlpsql4.dll" tmp\obj\release
    _shared\main.o tmp\obj\release_shared\qsql_psql.o tmp\obj\release_shared\moc_qsq
    l_psql.o -L"c:\Qt\4.3.2\lib" -L"c:\Qt\4.3.2\lib" tmp\obj\release_shared\qsqlpsq
    l_resource_res.o C:\psql\lib\ms\libpq.lib -lQtSql4 -lQtCore4
    Creating library file: c:\Qt\4.3.2\plugins\sqldrivers\libqsqlpsql4.a
    mingw32-make[1]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'

    How you can see no erros ocurred... but my program still say to me:

    Driver not found

    where should the driver be and what is his name?
    Last edited by brevleq; 5th December 2007 at 19:41.

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPSQL driver in windows

    Shouldn't you reconfigure and build Qt with psql support? Similarly than is done with MySQL in here: Building the QMYSQL plugin on Windows using MinGW
    cd C:\Qt\4.3.2
    configure -plugin-sql-psql
    make
    J-P Nurmi

  9. #9
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPSQL driver in windows

    huahua

    another problem. When I tried to recompill my program:

    C:\caixa_xpress>qmake *.pro

    C:\caixa_xpress>make
    mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/caixa_xpress'
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -mthreads -Wl -Wl,-subsystem,windows -o "debug\caixa_xpress.exe" object_scrip
    t.caixa_xpress.Debug -L"c:\Qt\4.3.2\lib" -lmingw32 -lqtmaind -lQtSqld4 -lQtGuid
    4 -lQtCored4
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
    d -lqtmaind
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [debug\caixa_xpress.exe] Error 1
    mingw32-make[1]: Leaving directory `C:/caixa_xpress'
    mingw32-make: *** [debug] Error 2

    What it didn't found?

    I did this before:

    [HTML]
    cd C:\Qt\4.3.2
    configure -plugin-sql-psql
    make
    [/HTML]
    Last edited by brevleq; 5th December 2007 at 20:33.

  10. #10
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QPSQL driver in windows

    You're attempting to compile a debug version of the application while you have no debug version of Qt itself built. Either build a release version of the application:
    make clean
    qmake -config release
    make
    or build a debug version of Qt (there is a shortcut in the start-menu in case you installed Qt from a binary installer, otherwise see "configure -help").
    J-P Nurmi

  11. #11
    Join Date
    Aug 2007
    Posts
    64
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPSQL driver in windows

    now it compilled but still saying:

    driver not Loaded

    I can't understand!! It works so well in Slackware 12!!
    Last edited by brevleq; 5th December 2007 at 20:44.

Similar Threads

  1. Can't find QPSQL driver!!
    By brevleq in forum Qt Programming
    Replies: 9
    Last Post: 30th October 2007, 00:29
  2. Windows not appearing in XP.
    By beardybloke in forum Qt Programming
    Replies: 7
    Last Post: 24th October 2007, 17:32
  3. Postgre driver mistic in windows
    By zlatko in forum Installation and Deployment
    Replies: 2
    Last Post: 13th March 2007, 13:15
  4. OCI Driver in Qt4 for Windows
    By DoNaLd in forum Installation and Deployment
    Replies: 2
    Last Post: 14th July 2006, 14:43
  5. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 22:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.