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

    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>

  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

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

  3. #3
    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??

  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

    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

  5. #5
    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.

  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

    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

  7. #7
    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.

  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

    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

  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

    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.

  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

    While running the Qt configure script, what was the output of:
    Sql Drivers:
    ...
    PostgreSQL..............??? <--
    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

    I don't remember so well, but I think was: yes or plugin

  12. #12
    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 did it again:

    configure -plugin-sql-psql
    make

    but this time:

    ...
    nclude\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\include\QtSql" -I"..
    \..\..\..\include" -I"c:\Qt\4.3.2\include\ActiveQt" -I"tmp\moc\debug_shared" -I"
    ." -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_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:158: error: `PGRES_COMMAND_OK' undeclare
    d (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `void QPSQLResult::c
    leanup()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:236: error: `PQclear' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLR
    esult::fetchLast()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:264: error: `PQntuples' undeclared (firs
    t use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual QVariant QP
    SQLResult::data(int)':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:269: error: `PQnfields' undeclared (firs
    t use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:273: error: `PQftype' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:275: error: `PQgetvalue' undeclared (fir
    st use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:276: error: `PQgetisnull' undeclared (fi
    rst use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:338: error: `PQunescapeBytea' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLR
    esult::isNull(int)':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:352: error: `PQgetvalue' undeclared (fir
    st use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:353: error: `PQgetisnull' undeclared (fi
    rst use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLR
    esult::reset(const QString&)':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:365: error: `PQexec' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual int QPSQLRe
    sult::numRowsAffected()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:376: error: `PQcmdTuples' undeclared (fi
    rst use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual QVariant QP
    SQLResult::lastInsertId() const':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:382: error: `Oid' undeclared (first use
    this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:382: error: expected `;' before "id"
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:383: error: `id' undeclared (first use t
    his function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:383: error: `InvalidOid' undeclared (fir
    st use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual QSqlRecord
    QPSQLResult::record() const':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:395: error: `PQnfields' undeclared (firs
    t use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:399: error: `PQfname' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:402: error: `PQftype' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:403: error: `PQfsize' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:404: error: `PQfmod' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `bool setEncodingUtf8(PGcon
    n*)':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:422: error: `PQexec' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:423: error: `PQresultStatus' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:424: error: `PQclear' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:425: error: `PGRES_COMMAND_OK' undeclare
    d (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `void setDatestyle(PGconn*)
    ':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:430: error: `PQexec' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:431: error: `PQresultStatus' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:432: error: `PGRES_COMMAND_OK' undeclare
    d (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:433: error: `PQerrorMessage' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:434: error: `PQclear' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `QPSQLDriver::Protocol getP
    SQLVersion(PGconn*)':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:439: error: `PQexec' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:440: error: `PQresultStatus' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:441: error: `PGRES_COMMAND_OK' undeclare
    d (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:441: error: `PGRES_TUPLES_OK' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:442: error: `PQgetvalue' undeclared (fir
    st use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:443: error: `PQclear' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In destructor `virtual QPSQLDriver::~QP
    SQLDriver()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:496: error: `PQfinish' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLD
    river:pen(const QString&, const QString&, const QString&, const QString&, int,
    const QString&)':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:569: error: `PQconnectdb' undeclared (fi
    rst use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:570: error: `PQstatus' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:570: error: `CONNECTION_BAD' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:571: error: `PQfinish' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual void QPSQLD
    river::close()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:591: error: `PQfinish' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLD
    river::beginTransaction()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:609: error: `PQexec' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:610: error: `PQresultStatus' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:610: error: `PGRES_COMMAND_OK' undeclare
    d (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:611: error: `PQclear' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLD
    river::commitTransaction()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:626: error: `PQexec' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:627: error: `PQresultStatus' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:627: error: `PGRES_COMMAND_OK' undeclare
    d (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:628: error: `PQclear' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual bool QPSQLD
    river::rollbackTransaction()':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:643: error: `PQexec' undeclared (first u
    se this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:644: error: `PQresultStatus' undeclared
    (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:644: error: `PGRES_COMMAND_OK' undeclare
    d (first use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:647: error: `PQclear' undeclared (first
    use this function)
    ..\..\..\sql\drivers\psql\qsql_psql.cpp: In member function `virtual QString QPS
    QLDriver::formatValue(const QSqlField&, bool) const':
    ..\..\..\sql\drivers\psql\qsql_psql.cpp:915: error: `PQescapeBytea' undeclared (
    first 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[4]: *** [tmp\obj\debug_shared\qsql_psql.o] Error 1
    mingw32-make[4]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    mingw32-make[3]: *** [debug-all] Error 2
    mingw32-make[3]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    mingw32-make[2]: *** [sub-psql-make_default] Error 2
    mingw32-make[2]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers'
    mingw32-make[1]: *** [sub-sqldrivers-make_default] Error 2
    mingw32-make[1]: Leaving directory `C:/Qt/4.3.2/src/plugins'
    mingw32-make: *** [sub-plugins-make_default-ordered] Error 2

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.