Solved (MySQL) qsqlmysql.dll doesn't get created.
-
@SGaist
I'm going reinstall Qt and try again.I'll open up a cmd prompt
C:\mysql
and then invoke qt-cmake using it's pathC:\Qt\6.4.3\msvc2019_64\bin\qt-cmake
I'll let you know how it goes. Ninja won't install on my system, give some sort of error regarding Microsoft Store.
-
Are you installing it through the Qt installer ?
-
@SGaist It is bundled with Qt in the
C:\Qt\Tools\Ninja\
folder but I can't "install" it. I tried searching for an answer it seems that its blocked by Microsoft Defender or something else in my environment that I can't disable. Do you think the drivers can be built without it?BTW, i'm a linux guy at heart and I'm probably going to try to set my Ubuntu environment at home for this.
-
Then there's nothing more you need to do. It should just work (tm). Ninja should be available.
On Linux you can use your distribution's Qt dev packages. It will be easier.
-
@SGaist
Normally I have to modify the qt-cmake.bat file to direct it to the correct folder for CMake. Should I be modifying that or should I move my CMake installation folder to where its currently represented in the file? Same question for Ninja. -
You shouldn't need to do that at all.
If cmake is not found, you are likely using a terminal not configured properly.You can modify the PATH environment variable.
-
BREAKTHROUGH!!!
explanation incoming
-
Here's what I did and what I got.
Before I go any further I'd really like to thank you @SGaist, @Christian-Ehrlicher , @jsulm for your help. I am approaching this as a complete beginner and this is no simple task to understand.
After I got by butt out of the QT folder for building I used the Start Menu terminal entry for the platform my app will be in (MSVC2019_64) and navigated to my self-made
C:\mysql
folder.I was able to build the plugins using
qt-cmake C:\Qt\6.4.3\Src\qtbase\src\plugins\sqldrivers -DMySQL_INCLUDE_DIR="C:\Program Files\MySQL\MySQL Connector C 6.1\include" -DMySQL_LIBRARY="C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib"
Once the plugins were created I was able to build
qsqlmysql.dll
andqsqlmysql.pdb
by opening the ALL_BUILD.vcxproj in visual studio and building it there (which is what I think @Christian-Ehrlicher was trying to tell me instead of using the command line).I transferred the newly made
qsqlmysql.dll
andqsqlmysql.pdb
to the platform folder ofC:\Qt\6.4.3\msvc2019_64\plugins\sqldrivers
.I believe I still have to install the drivers but this is obviously the result I've yet to get up to this point.
EDIT:
Did the same process of opening up INSTALL.vcxproj in Visual Studio and building it there and it was also a success. Now I imagine I just have the right #includes in my project and should be able to connect to MySQL. If it would benefit the community I'd be happy to write up an in depth breakdown of how this is done for my system.
-
Where do I find the project that builds the debug version? I have the release qsqlmysql.<dll.pdb> but not qsqlmysqld<dll.pdb>
-
@Thelonious You can change the build type in the msvc IDE.
But as I said - use NMake Makefiles or Ninja to create both of them directly on the command line...
-