Re: QPSQL driver not loaded
In folder <POSTGRESQL>\installer is located MSVC runtime vcredist_x86.exe. Try to run it once.
Re: QPSQL driver not loaded
Tried running it. It is vcredist_x64 for me. same problem persists.
Thanks for the reply. I am using mingw as my compiler
Re: QPSQL driver not loaded
I'm not sure if you can directly combine MSVC dlls with mingw code. I understand that your application is 64-bit.
Re: QPSQL driver not loaded
In addition to the Qt PSQL driver library, aren't there client-side PSQL shared libraries that also need to be present and loadable? I know this is the case for MySQL.
It is unfortunate that Qt reports that a DB driver is available (in the available drivers list) simply if it detects the corresponding Qt driver DLL, without checking to see if the files needed to actually use that driver can be loaded as well. This has been the source of many, many posts on this forum and elsewhere.
Quote:
I'm not sure if you can directly combine MSVC dlls with mingw code.
I would guess that if the DLLs are C++ based, the name-mangling between MSVC++ and mingw-gcc would be different and incompatible. C-only DLLs are probably compatible since there is no name-mangling that I'm aware of. It sort of has to be, otherwise I would think that mingw wouldn't be able to use the low-level Windows runtime DLLs (kernel32, etc.)