This is how i build postgresql plugin:

Qt Code:
  1. qmake "INCLUDEPATH+=C:\Programs\PostgreSQL\8.4\include" "LIBS+=C:\Programs\PostgreSQL\8.4\lib\libpq.lib" psql.pro
  2. qmake
  3. mingw32-make debug
  4. mingw32-make release
To copy to clipboard, switch view to plain text mode 

I don't use reimp and dlltool, but it works.