Hello,

I'm using qt4 on a Windows 7 system and I'm trying to get access to a PostgreSQL 9 DB.

That's why I'm trying to add libpg.lib (with libpg-fe.h) to my project. But I'm doning something wrong.

I added "LIBS += -lpg" to my projectfile *.pro.
Qt Code:
  1. QT += core gui
  2.  
  3. TARGET = SQL_BSP
  4. TEMPLATE = app
  5.  
  6. LIBS += -lpg
  7.  
  8. SOURCES += main.cpp\
  9. mainwindow.cpp \
  10. postgresqldb.cpp
  11.  
  12. HEADERS += mainwindow.h \
  13. libpq-fe.h \
  14. postgres_ext.h \
  15. postgresqldb.h
  16.  
  17. FORMS += mainwindow.ui
  18.  
  19. OTHER_FILES += \
  20. libpq.lib
To copy to clipboard, switch view to plain text mode 

When I start compiling my project I get the following error message:
Qt Code:
  1. cannot find -lpg
  2. collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode 

I'm waiting for your help.
Thanks,
Alex