Page 2 of 2 FirstFirst 12
Results 21 to 32 of 32

Thread: QPSQL driver in windows

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

    My folder structure looks like this for the release version:
    Qt Code:
    1. ./myapp.exe
    2. ./comerr32.dll (version 1.3.5.0)
    3. ./krb5_32.dll (version 1.3.5.0)
    4. ./libeay32.dll (version 0.9.8.1)
    5. ./libiconv-2.dll
    6. ./libintl-2.dll
    7. ./libpq.dll (version 8.1.5.6286)
    8. ./ssleay32.dll (version 0.9.8.1)
    9. ./sqldrivers/qsqlpsql.dll
    10. ./qtcore4.dll
    11. ./qtsql4.dll
    12. ./qtgui4.dll
    To copy to clipboard, switch view to plain text mode 

    This works perfectly fine. However, keep in mind that a debug build of your software should link against the debug qt libs (this includes the debug build of qsqlpsql.dll!).
    Considering that my libpq is a lot more recent than yours, I would not rule out the option that that might be a source of trouble, too.
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

  2. #22
    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 think the problem is with libpq.dll!! In dependency walker it returned a error and the icon for this dll was red!!

    Can you send me your dll??

    brevleq@gmail.com

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

    Actually my libpq is the one that was shipped with the pgsql binaries, what about using that one?
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

  4. #24
    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'm sorry but I can't!!
    I did a search in my windows to find this dll, but the search finished with no results!!

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

    Which psql package did you install? Perhaps it's a development package you have to build yourself. However, there are binary packages available for sure too.
    J-P Nurmi

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

    Last edited by brevleq; 8th December 2007 at 16:23. Reason: updated contents

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

    Well, then the libpq should be located in postgresql's bin folder. I just sent you my libpq, though. I do not guarantee for it to work now, though.
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

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

    huahuahua

    I looked to my psql directory again and the libpq was here!!

    Now I have another problem!! When I try to run my program the windows retuns this error:

    [HTML]Runtime Error!

    Program: C:\caixa_xpress\release\caixa_xpress.exe

    R6034
    An application has made an attempt to load the C runtime Library incorrectly.
    Please contact the application's support team for more information.
    [/HTML]

    I'm putting a lot of dlls in my release directory, the mingw isn't linking the dlls? I believe its not necessary put all these dlls in my folder!! I'm wrong?

  9. #29
    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'm here again!!

    At this time I tryied:

    C:\Qt\4.3.2> configure -release -qt-sql-psql -plugin-sql-psql -I C:\psql\include
    -L C:\psql\lib\ms

    and then make:

    mingw32-make[4]: 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 -LC:\psql\lib\ms -lpq -lws2_32 -ladvapi32 -lQtSql4 -lQtCore4
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
    d -lpq
    collect2: ld returned 1 exit status
    mingw32-make[4]: *** [..\..\..\..\plugins\sqldrivers\qsqlpsql4.dll] Error 1
    mingw32-make[4]: Leaving directory `C:/Qt/4.3.2/src/plugins/sqldrivers/psql'
    mingw32-make[3]: *** [release] 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

    Why this error is appearing?

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

    What does C:\psql\lib\ms contain?
    J-P Nurmi

  11. #31
    Join Date
    Oct 2006
    Posts
    42
    Thanks
    1
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPSQL driver in windows

    I'm going to make a wild guess and probably make a fool of myself, but here we go... That ms in C:\psql\lib\ms makes me think of MSVC, but you're compiling with MinGW. I don't think you can use MSVC compiled libs with MinGW without applying some magic first.

    C:\psql\lib seems to contain the MinGW compiled libs, so use those instead. Try:
    configure -release -qt-sql-psql -I C:\psql\include -L C:\psql\lib

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

    I did it and my program works well now!!
    The conection with DB is ok!!

    Thanks for all that helped me!!

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.