Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Building MySQL driver for android
I can't build mysql driver for android. I need a way to communicate my android app with mysql server. When I build my program the compiler output say: mysql driver not loaded. Available driver Qsqlite.
I need help with this. I'm using qt 5.14.2 on window 10.
There's no MySQL client library pre-built for Android. If anything you have to go with MariaDB and start from there.
@SGaist You say that I need to build the driver with Mariadb connector. I can use the same procedure for window!?
No, you first have to cross-compile the MariaDB connector and then build the driver.
@SGaist Excuse me, I'm new in this. I can build my programs for android, additionally I need to make cross compilation!? Or just tu build Mariadb drive?
A quick search would have gotten you the Wiki page for the procedure.
@SGaist Sorry, I'm trying to build the driver according to wiki page but command make isn't found it. Can I use qmake or I just need to add make to the environment variables!?
No you can't use qmake in place of make as these are two different tools for different purposes.
You can try using jom.exe
@SGaist When I´m triying to build and It close .sh with this NOTE: If in doubt, on Unix-ish systems use './config'.
make: *** No se especific▒ ning▒n objetivo y no se encontr▒ ning▒n makefile. Alto.
diff: ./rootfs_files_before.txt: No such file or directory
@SGaist It looks like there is no makefile file. What other option could have to generate the driver for android in Window.
@qtlearning # OpenSSL
dir=$(basename $pkg .tar.gz)
if [ ! -d $dir ]; then
wget -c http://www.openssl.org/source/$pkg
tar -xf $pkg || exit 1
if [ ! -f "skip" ] || [ "$no_skips" = true ]; then
RANLIB="$BR"ranlib CC="$BR"gcc ./Configure android-armv7 --prefix=$SR/usr #This line
ANDROID_DEV=$SR/usr make || exit 1
make build_libs || exit 1
@SGaist I think the problem is in the line that says "this line". The "/. Config" is not running and no file is generated for the make to process. Or should I change the folder where the make is running?
@SGaist Excuse me, I found that the problem to create the driver is that the configure statement was not working. Check the information, I corrected it and now I get that the gcc compiler cannot find it due to the address given in the script. So I try to use clang, which is the one that brings the new ndk and I keep jumping the same error. What could I do?
Did you use the KDAB project I linked ?