Results 1 to 4 of 4

Thread: cross compiling with linux to create a windows app, cant get libpq to link

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11 Maemo/MeeGo

    Default cross compiling with linux to create a windows app, cant get libpq to link

    Hi folks
    Im using the latest qt and im able to create linux apps and cross compile windows apps on a linux ubuntu system. But now i need my windows app to access a postgresql database that is running on an external linux box. so i added the following to my .pro file

    unix:LIBS += -lpq
    win32:LIBS += libpqdll.lib

    a database connection works ok when compiling for linux but im getting this error when i compile the app for windows.

    /usr/lib/gcc/i586-mingw32msvc/4.4.2/../../../../i586-mingw32msvc/bin/ld: cannot find -lpqdll.lib

    I know i probably have to download the lib or build the lib from source. Where would i find this library? or do i search for it on the mingw site and just download it and place it in the proper location? Any help would be appreciated. Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: cross compiling with linux to create a windows app, cant get libpq to link

    Why don't you use Qt's database plugins? You wouldn't need to link against libpq directly.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. What other libs to link with Libpq in Ubuntu?
    By feraudyh in forum Installation and Deployment
    Replies: 14
    Last Post: 23rd September 2010, 07:30
  2. Cross compiling Qt 4 apps for linux
    By Dante in forum Qt Programming
    Replies: 9
    Last Post: 13th May 2009, 13:33
  3. Cross-Compiling Linux to Windows
    By xgoan in forum Qt Programming
    Replies: 10
    Last Post: 5th July 2007, 20:44
  4. link error when cross-compiling qtopia 4.2.0
    By ghellman in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 9th February 2007, 04:13
  5. Cross compiling QT3 on Linux, for win32
    By mjrich in forum Installation and Deployment
    Replies: 10
    Last Post: 6th March 2006, 18:58

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.