Results 1 to 4 of 4

Thread: compile psql

  1. #1
    Join Date
    Jan 2006
    Posts
    273
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default compile psql

    Hello everybody,

    I am trying to compile psqlpsql.dll and i get following error:
    Qt Code:
    1. D:\Apps\MINGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: canno
    2. t find -lpq
    3. collect2: ld returned 1 exit status
    4. mingw32-make[1]: *** [d:\Apps\Qt\4.2.3\plugins\sqldrivers\qsqlpsql.dll] Error 1
    5. mingw32-make[1]: Leaving directory `D:/apps/Qt/4.2.3/src/plugins/sqldrivers/psql
    6. '
    7. mingw32-make: *** [release] Error 2
    To copy to clipboard, switch view to plain text mode 
    I am trying like this:
    Qt Code:
    1. D:\apps\Qt\4.2.3\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=D:\
    2. apps\PostgreSQL\8.1\include D:\apps\PostgreSQL\8.1\include\libpq" psql.pro
    To copy to clipboard, switch view to plain text mode 
    Can somebody see whats wrong?

    Thanks
    Think DigitalGasoline

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: compile psql

    Did you read Assistant->SQL Database Drivers->QPSQL for PostgreSQL (Version 7.3 and Above) ?
    How to Build the Plugin on Windows
    Install the PostgreSQL developer libraries. Assuming that PostgreSQL was installed in
    C:\psql, build the plugin as follows:

    cd %QTDIR%\src\plugins\sqldrivers\psql
    qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
    nmake

  3. #3
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compile psql

    Quote Originally Posted by L.Marvell View Post
    Did you read Assistant->SQL Database Drivers->QPSQL for PostgreSQL (Version 7.3 and Above) ?

    Warning MINGW compiler is not VS... i suppose PostgreSQL have the same problem like mysql ..

    Qt Code:
    1. cd VS buildet lib dir ....
    2. reimp -d libmysql.lib
    3. dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a
    4. dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib c:\MINGW\lib\libmysql.a
    5. /* move mysql include to MINGW\include\*/
    6. /*
    7. cd qtdir
    8. configure -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg
    9.  
    10. */
    To copy to clipboard, switch view to plain text mode 

    test this as sample to PostgreSQL chance the lib to PostgreSQL

  4. #4
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: compile psql

    Quote Originally Posted by patrik08 View Post
    Warning MINGW compiler is not VS... i suppose PostgreSQL have the same problem like mysql ..

    Qt Code:
    1. cd VS buildet lib dir ....
    2. reimp -d libmysql.lib
    3. dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a
    4. dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib c:\MINGW\lib\libmysql.a
    5. /* move mysql include to MINGW\include\*/
    6. /*
    7. cd qtdir
    8. configure -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg
    9.  
    10. */
    To copy to clipboard, switch view to plain text mode 

    test this as sample to PostgreSQL chance the lib to PostgreSQL
    Nope, I didn't have such problems with Postgres, all builds without problems.

Similar Threads

  1. Qt-4.2.2 qmake won't compile under visual studio 2005 on vista
    By moowy in forum Installation and Deployment
    Replies: 7
    Last Post: 13th January 2007, 21:06
  2. Need to compile with MySQL drivers/plugins
    By mongenix in forum Newbie
    Replies: 5
    Last Post: 6th January 2007, 20:24
  3. Compile Errors
    By luffy27 in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2006, 05:26
  4. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 15:29
  5. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15

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.