QMySQL , can't build it..
-
Hi!..
I'm having troubles while building QMySQL plugin on Windows | Mac, problem is that i cant find any documentation or tutorial how to do it, i follow the official tutorial from Qt Docs, but when try to execute this line:nmake sub-mysql
it says nmake is not a command, ok, i use mingw32 so :
mingw32-make sub-mysql
but it says that is no rule to build target.
Any help?..
thanks -
-
My friend, those were exactly the step i followed..
i got problems:mingw32-make sub-mysql
but it says that is no rule to build target
-
@U7Development said in QMySQL , can't build it..:
those were exactly the step i followed..
So what was the output? Please start over by removing all generated files and post the output.
-
According to docs i need to install mysql web community and install it specially C Connector 6.1, right, that is installed successfully.
The required files are present on my machine :
<MySQL dir>/lib/libmysql.lib
<MySQL dir>/lib/libmysql.dll
<MySQL dir>/include/mysql.hThen i execute the next commands:
-
cd %QTDIR%\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"
-
nmake sub-mysql
-
nmake install
Command 1 is OK
Command 2 prints out a configuration summary wish says that MySql driver is set to "no" (i don't know if it is really fine)Since i don't own nmake, i need to switch to mingw32-make:
Command 3 get this error:
mingw32-make: *** No rule to make target 'sub-mysql'. Stop.Either i can not finish well this command, i have not continued to execute command 4...
Edit : I noticed i can use ODBC to connect to MySql too.. is there any difference between this and native plugin?
-
-
@U7Development said in QMySQL , can't build it..:
Command 2 prints out a configuration summary wish says that MySql driver is set to "no" (i don't know if it is really fine)
Are you serious? What else should be printed out that the driver can not be build?
So take a look into config.log (as explained in the docs) and see why the driver could not be build.
-
Trying this one? I used meet the same problem.
https://forum.qt.io/topic/110176/build-qmysql-driver-under-windows-10-a-sample-solution-for-qsqldatabase-qmysql-driver-not-loaded/15