MYSQL / QT issues
-
Hi sorry not sure where to see this, there was no mention of connector .dll in the debuf_plugin message, I think I need to follow this step: compiling driver. However I dont have a qt command prompt and am struddling to run through the standard windows cmd line. Aslo in looking at other threads, I do not have a .pro in the mysql folder in ~src/plugins/sqldrivers/mysql could this be the issue?
-
Based on the output, you already have the .dll.
As for the MySQL connector .dll, where did you install MySQL ?
-
Then, do you have that path in your PATH environment variable ? (Still in Qt Creator)
-
PATH is already defined, you may have to check a checkbox on the Run panel in order to have access to it.
-
@SGaist I have also tried to compile driver using the following in the command prompt :
C:\Qt\6.2.3\Src\qtbase\src\plugins\sqldrivers>qmake -version
QMake version 3.1
Using Qt version 6.2.3 in C:/Qt/6.2.3/mingw_64/libC:\Qt\6.2.3\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/lib"
However it doesnt do anything after the second command, just gives me basic qmkae info.
-
Hi, I couldnt find the PATH variable but ran this command in main.cpp:
QCoreApplication::addLibraryPath("C:\Program Files\MySQL");
However this didnt change any of the logs. Im a bit lost with where to go from here@Jdonoher said in MYSQL / QT issues:
QCoreApplication::addLibraryPath("C:\Program Files\MySQL");
Did you really copy and paste this line from your C++ source code file? Please copy and paste whatever you have literally, do not type it in by hand.....
-
@Jdonoher said in MYSQL / QT issues:
QCoreApplication::addLibraryPath("C:\Program Files\MySQL");
Did you really copy and paste this line from your C++ source code file? Please copy and paste whatever you have literally, do not type it in by hand.....
-
-
I've alslo managed to finally get .pro file in my /mysql dir in src. However it cannot build, I have included the include path from the mysql connector as well as added the lib to LIBS. but am getting 3 errors:
Here is mysql.pro file:
-
@Jdonoher
I could be wrong, but because your paths have spaces in them I would have expected them to need to be quoted, like:INCLUDEPATH += "C:/Program Files/MySQl/MySQL Connector C 6.1/include" LIBS += "C:/Program Files/MySQl/MySQL Connector C 6.1/lib"
-
Simply move it to a folder without spaces...