Can anybody who may have any idea compiling Qt 5.8 Open Source statically with PostgreSQL support on Windows. I tried all the options known to me including the below. I'm using qt 5.8 sources on Windows 10 x64.

configure -opensource -confirm-license -debug-and-release -static -platform win32-msvc2015 -nomake examples -nomake tests -sql-psql PSQL_LIBS="C:\PSQL\9.6\lib\libpq.lib" -I C:\PSQL\9.6\include\libpq -I C:\PSQL\9.6\include -L C:\PSQL\9.6\lib\libpq.lib


After running the config above, I seem to be getting the below:

Note: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library. ERROR: Feature 'sql-psql' was enabled, but the pre-condition 'libs.psql' failed. Check config.log for details.

Am I missing something here?