Results 1 to 5 of 5

Thread: Issue with QMake

  1. #1
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Issue with QMake

    Hi
    I am trying to rewrite a Makefile using qmake.
    The original Makefile contains the lines:
    prog: pg.o
    gcc pg.o -L "C:\Program Files\PostgreSQL\8.1\lib" -lpq
    How should I rewrite them in the .pro files?
    something like:
    LIBS += "C:\Program Files\PostgreSQL\8.1\bin\*"
    what about the -lpg?
    I would appreciate any help
    Thanks
    JCR

    PS: I understand I could use the Qt PostgreSQL driver, but, for the time being, it would be easier just to port the make file.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Issue with QMake

    It should be:
    LIBS += -L"C:\Program Files\PostgreSQL\8.1\lib" -lpq
    Last edited by jacek; 13th March 2006 at 23:26. Reason: fixed typo

  3. #3
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issue with QMake

    Hi,
    Thanks for the lead but I am still unable to compile:
    The old makefile contains:
    prog: pg.o
    gcc pg.o -L "C:\Program Files\PostgreSQL\8.1\lib" -lpq
    pg.o: pg.c
    gcc -c -I "C:\Program Files\PostgreSQL\8.1\include" pg.c
    and the .pro file (among other lines)
    INCLUDEPATH += "C:\Program Files\PostgreSQL\8.1\include"
    LIBS += -L"C:\Program Files\PostgreSQL\8.1\lib" -lpg

    I am pasting here the end of the message error:
    g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,console -o "a.exe" object_script
    .a.Release -L"C:\Qt\4.1.1\lib" c:\Boost\lib\libboost_serialization-mgw-mt-s.lib c:\Boost\lib\libboost_date_time-mgw-mt-s.lib c:\Boost\lib\libboost_filesystem
    -mgw-mt-s.lib -L"C:\Program Files\PostgreSQL\8.1\lib" -lpg -lQtGui4 -lQtNetwork4 -lQtCore4
    c:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot find -lpg
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [a.exe] Error 1
    mingw32-make[1]: Leaving directory `c:/ventures/finance'
    mingw32-make: *** [release] Error 2
    Thanks
    JCR

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Issue with QMake

    It's just a typo --- it should be -lpq instead of -lpg.

  5. #5
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Issue with QMake

    my apologies...
    I had just realized that and re-ran everything and it works fine!
    thank you very much Jacek
    JCR

Similar Threads

  1. qmake sux a lot
    By singermornings in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 08:33
  2. qmake issue with UIC
    By rickbsgu in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 01:07
  3. qt3 to qt4 - uic issue
    By hvengel in forum Qt Programming
    Replies: 10
    Last Post: 4th March 2007, 02:59
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.