Unsolved QT QPSQL compile driver MSVC 2019 64
-
No reinstallation of MSVC needed, just have to make sure your current console is able to compile a simple main.cpp which includes stdio.h.
-
everything is compiled in visual studio, everything is compiled in visual studio. I think that it is necessary to indicate somewhere the paths to C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\SDK\scopecppsdk\vc15\SDK\include\ucrt stdio.h is located here
-
And that's done when you open a MSVC developer command prompt... so make sure you properly open it and a simple main.cpp as explained above can be compiled from there.
-
everything is compiled from the command line -
So when there is an include of stdio.h then you should also be able to compile the qt sql driver there.
-
Thanks for the help compiled into the Command Line of native x64 tools for VS 2019. another question is how to add a driver to the project? and where is it located?
-
@tomsmith said in QT QPSQL compile driver MSVC 2019 64:
how to add a driver to the project?
Simply load it like any other Qt Sql driver: https://doc.qt.io/qt-5/qsqldatabase.html#details
and where is it located?
It must be under <QTDIR>/plugins/sqldrivers
-
in my project I use Qt 5.15.2 (MSVC 2019 64) but the same error fatal error C1034: stdio.h: no include path set is not compiled under it. How to configure?
-
@tomsmith said in QT QPSQL compile driver MSVC 2019 64:
How to configure?
As explained above - open the MSVC developer command prompt as @tomsmith did...
-
everything is solved everything works in the folder C:\Qt\5.15.2\msvc2019_64\bin I threw it libpq.dll and qsqlpsqld.dll
when compiling the driver from the Qt 5.15.2 window (MSVC2019 64), it was necessary to run C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat then compilation is performed without errors.
Thanks for the help.
-
@tomsmith said in QT QPSQL compile driver MSVC 2019 64:
t was necessary to run C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat then compilation is performed without errors.
This is what I told you ...
open the MSVC developer command prompt