building a mysql dll in QT to connect to a database
Hi !
I need a step by step how to compile the SQL driver to connect to my online MySql db. The idea is to compile a DLL which I copy to the working directory so the application will be able to use QMYSQL to connect with my online db.
The online documentation ( https://dev.to/f1r361rd/how-i-build-...s-mingw32-2kim ) and forums did not helped much . In the information i found online i noticed that most people downloaded qmysql.dll, and use that file to be able to get QMYSQL loaded.
Code:
sql_drivers.contains("QMYSQL") -> true
But that dll is version dependent , so i hope there is a solution to get this working on all versions of QT application i make in the future.
Already spend many hours searching on forums and talked with other software engineers . Most people seems to get not much further then searching for a compiled dll ... After spending 10+ hours trying every post i see, i still have no clue about the basic steps, the internet is scattered with too much information which is contra productive in this case, so i really seek for a simple step by step solution, tearing this thing apart to it becomes clear how it works. No one liners please. Many people will be helped with the answer to this post ! if it take too much time to write down the solution, I’m happy to send a financial compensation.
If there are simpler solutions, please let me know too:)
Thank you Steve
Re: building a mysql dll in QT to connect to a database
Did you follow these instructions? (If you are using Qt6, select that from the version dropdown list on the left of the page).
Do you have the appropriate MySQL connector package installed?
Re: building a mysql dll in QT to connect to a database
As d_stranz said...
AND you need the mysql dev files installed on your machine, of course. On linux you need the packages libmariadb-dev and libmariadbclient-dev - no idea what the Windows counterpart is.
Re: building a mysql dll in QT to connect to a database
I never used command line to build, I always use the IDE, so i could really use some help :)
Re: building a mysql dll in QT to connect to a database
I'm a Windows / Visual Studio developer myself and don't have too much familiarity with either linux or Qt Creator. Maybe one of the linux gurus here could give you some advice.