Page 1 of 2 12 LastLast
Results 1 to 20 of 32

Thread: QPSQL driver in windows

  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 20: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 21: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 21:44.

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

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

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

  15. #15
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Thanks
    2
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPSQL driver in windows

    You forgot to specify the lib and include path for the libpq.lib and postgre header files while running configure.
    However, it is not necessary to recompile qt with -plugin-sql-pgsql if managed to build the pgsql plugin. What you have to do is to put the qsqlpsql.dll file into a folder called "sqldrivers" in your application directory, and also put all the qsqlpsql.dll dependencies (libpq.dll, libeay32.dll etc) into your application directory. Only then the psql driver will be loaded properly.
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

  16. #16
    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 what you said:

    C:\caixa_xpress\release>dir
    O volume na unidade C não tem nome.
    O número de série do volume é 4888-B441

    Pasta de C:\caixa_xpress\release

    06/12/2007 20:16 <DIR> .
    06/12/2007 20:16 <DIR> ..
    06/12/2007 20:10 495.104 caixa_xpress.exe
    12/10/2005 09:32 24.576 comerr32.dll
    25/10/2003 14:31 888.832 iconv.dll
    12/10/2005 09:32 524.288 krb5_32.dll
    03/11/2005 11:50 1.064.960 libeay32.dll
    10/11/2006 15:11 1.227.264 libgeos-2.dll
    10/11/2006 15:11 348.672 libgeos_c-1.dll
    31/01/2003 18:41 916.849 libiconv-2.dll
    01/02/2003 15:51 51.016 libintl-2.dll
    20/04/2007 11:22 186.822 libpq.dll
    10/11/2006 15:11 199.680 libproj.dll
    21/02/2006 12:10 4.025.444 libxml2-2.dll
    07/01/2006 10:39 946.688 libxml2.dll
    03/01/2006 19:16 153.088 libxslt.dll
    01/12/2006 23:03 1.869 Microsoft.VC80.CRT.manifest
    13/01/2005 17:19 15.960 mingwm10.dll
    02/12/2006 07:22 479.232 msvcm80.dll
    01/12/2006 23:03 548.864 msvcp80.dll
    01/12/2006 23:03 626.688 msvcr80.dll
    23/03/2007 16:01 69.632 pgaevent.dll
    16/04/2007 12:00 94.208 pgenlist.dll
    16/04/2007 12:01 94.208 pgenlista.dll
    17/04/2006 23:25 196.608 pgoledb.dll
    16/04/2007 12:00 110.592 pgxalib.dll
    16/04/2007 12:01 475.136 psqlodbc30a.dll
    16/04/2007 12:00 483.328 psqlodbc35w.dll
    04/06/2005 02:52 60.273 pthreadGC2.dll
    25/11/2007 18:27 2.078.720 QtCore4.dll
    01/10/2007 12:49 9.116.672 QtGui4.dll
    01/10/2007 12:50 291.328 QtSql4.dll
    06/12/2007 20:06 <DIR> sqldrivers
    03/11/2005 11:50 200.704 ssleay32.dll
    20/07/2005 11:48 59.904 zlib1.dll
    32 arquivo(s) 26.057.209 bytes
    3 pasta(s) 1.228.476.416 bytes disponÃ*veis

    C:\caixa_xpress\release\sqldrivers>dir
    O volume na unidade C não tem nome.
    O número de série do volume é 4888-B441

    Pasta de C:\caixa_xpress\release\sqldrivers

    06/12/2007 20:06 <DIR> .
    06/12/2007 20:06 <DIR> ..
    05/12/2007 17:36 81.408 qsqlpsql4.dll
    1 arquivo(s) 81.408 bytes
    2 pasta(s) 1.228.476.416 bytes disponÃ*veis

    but the message Driver not Loaded still appears!!

    I forgot some dll??

  17. #17
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Thanks
    2
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPSQL driver in windows

    Quote Originally Posted by brevleq View Post
    but the message Driver not Loaded still appears!!

    I forgot some dll??
    If you want to check if some DLL is missing, run dependency walker on your exectuable / qsqlpsql.dll. Out of the top of my head it all looks fine.

    The psql plugin is built with the same build key as Qt? (That should be the case unless your specified your own build key, which is unlikely)
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

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

    Quote Originally Posted by Methedrine View Post
    The psql plugin is built with the same build key as Qt? (That should be the case unless your specified your own build key, which is unlikely)
    I didn't understand it!! How can I know if it is built with the same build key?

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

    Quote Originally Posted by Methedrine View Post
    If you want to check if some DLL is missing, run dependency walker on your exectuable / qsqlpsql.dll.
    I runned dependency walker and It didn't found 2 dlls:

    LIBPQ.DLL
    MSJAVA.DLL

    I found these two files in internet!! The first I putted in my application/sqldrivers directory and the second in c:\windows\system
    I'm using postgre 8 and the libpq.dll is 7.0.2 have any problem with it?

  20. #20
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Thanks
    2
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPSQL driver in windows

    Quote Originally Posted by brevleq View Post
    I didn't understand it!! How can I know if it is built with the same build key?
    If you did not specify a build key explicitely when running qconfigure, then rest assured - it will be the same.

    Quote Originally Posted by brevleq View Post
    I runned dependency walker and It didn't found 2 dlls:

    LIBPQ.DLL
    MSJAVA.DLL

    I found these two files in internet!! The first I putted in my application/sqldrivers directory and the second in c:\windows\system
    I'm using postgre 8 and the libpq.dll is 7.0.2 have any problem with it?
    I'll check this as soon as I am back home.
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

Similar Threads

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