hi,
after reading alot of threads and documentation i decided to post, cause non of the found solutions worked for me.

Problem: after i compiled the plugin the app couldnt it load so i put the dll and some other dll to appdir and appdir/sqldriver. Now the app can load the driver connect to the server but crashes with a valid sql query an invalid like wrong table will be outputed as lasterror.

Okay now a bit more detailed:

Compiling the Plugin:
- Downloaded & Installed "qt-win-opensource-4.2.3-mingw.exe"
- Downloaded & Installed "postgresql-8.2.3-1.zip" (with setup)
- Downloaded & Extracted "postgresql-8.2.3-1-binaries-no-installer.zip" to c:\psql

Now i changed the following code
Qt Code:
  1. cd %QTDIR%\src\plugins\sqldrivers\psql
  2. qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
  3. make
To copy to clipboard, switch view to plain text mode 
to
Qt Code:
  1. cd %QTDIR%\src\plugins\sqldrivers\psql
  2. qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\bin\libpq.dll" psql.pro
  3. make
To copy to clipboard, switch view to plain text mode 

Now compiling seems to work and the plugin is builded. After copying it over to appdir and some other .dll's from c:\psql\bin the app finds the plugin and crashes like described.

Sb. told me to backtrace the app with gdb i did and attached the output.
Source of my App is here: http://nopaste.info/79d8acca60.html

GDB Log can be found here:
http://www.file-upload.net/download-219057/gdb.txt.html

Hopefully sb. can explain me this strange behaviour , tuxi