Can You Help me Please , MySQL + Android on Qt



  • Hello I develop my first mobile application from Qt and I face the famous problem between Android and MySQL. I read a lot of documentation including that of Qt but here it's been 1 month that I can not create this Driver (multiple error in the make, impossible to compile mysql under Qt etc) I want to specify that I I am under windows system to develop.

    So I desperate a bit and I would like to know if a charitable soul could either drop me a video update manipulations to do because all that I could see in 1 month and obsolete or drop me this famous bookstore.

    Thank you for reading me.


  • Moderators

    @Lenawel I never build it, but what would be interesting to know: do you really want to connect from an Android device directly to a MySQL server?



  • @jsulm yes i use a class connexion like that

    .h

    #ifndef MACONNEXION_H
    #define MACONNEXION_H
    #include <QSqlDatabase>
    #include <QSqlQuery>
    #include <QMessageBox>
    
    class MaConnexion
    {
    public:
        MaConnexion();
        QSqlDatabase *GetConnexion();
    private:
        QSqlDatabase *MaConnexionBase;
    };
    inline QSqlDatabase * MaConnexion::GetConnexion()
    { return MaConnexionBase; }
    
    #endif // MACONNEXION_H
    

    .cpp

    #include "maconnexion.h"
    
    MaConnexion::MaConnexion()
    {
    
    MaConnexionBase = new QSqlDatabase (QSqlDatabase::addDatabase("QMYSQL"));
    MaConnexionBase->setDatabaseName("database");
    MaConnexionBase->setHostName("192.XXX.XXX.XXX");
    MaConnexionBase->setUserName("root");
    MaConnexionBase->setPassword("rootpass");
    MaConnexionBase->open();
    }
    

    and Open db in a MainWindows constructor

    MaConnexion * A = new MaConnexion();
        db = A->GetConnexion();
    

    And after use some QSqlQuerry ; prepare(),exec(),next(), bindValue() etc etc so i really need this plugin cause i need to write information in a Database server at my work


  • Moderators

    @Lenawel My question is more like: WHY do you want to connect directly from an Android device? If you do it this way it means your SQL server needs to be reachable over network or even Internet (!) if you want to connect over Internet.
    Usually one hides SQL behind for example REST API.



  • i need access on this db from intranet and inter and other mobil app


  • Moderators

    @Lenawel Well, if you think you really need direct access to the DB over Internet then do it but it is very dangerous and not how it is usually done.



  • I progress a Lot of but know i have a mistake on final make

    devellopement1@POR-LAG45 /c/Projects/AndroidMySQL/mariadb-connector-c-3.0.0-alpha-src/build
    $ make
    Scanning dependencies of target mariadb_obj
    [  0%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/plugins/pvio/pvio_socket.c.o
    [  1%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/plugins/auth/my_auth.c.o
    [  2%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/array.c.o
    [  2%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/ma_dyncol.c.o
    [  3%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/bchange.c.o
    [  3%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/bmove.c.o
    [  4%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/bmove_upp.c.o
    [  4%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_charset.c.o
    [  5%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/hash.c.o
    [  5%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/net.c.o
    [  6%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/charset.c.o
    [  6%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/ma_time.c.o
    [  7%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/dbug.c.o
    [  7%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/default.c.o
    [  8%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/errmsg.c.o
    [  8%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_vsnprintf.c.o
    [  9%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/errors.c.o
    [  9%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/getopt1.c.o
    [ 10%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/getopt.c.o
    [ 11%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/int2str.c.o
    [ 11%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/is_prefix.c.o
    [ 12%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/libmariadb.c.o
    [ 12%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/list.c.o
    [ 13%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/llstr.c.o
    [ 13%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/longlong2str.c.o
    [ 14%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/ma_pvio.c.o
    [ 14%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/ma_ssl.c.o
    [ 15%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_dirname.c.o
    [ 15%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_fn_ext.c.o
    [ 16%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_format.c.o
    [ 16%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_loadpath.c.o
    [ 17%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_pack.c.o
    [ 17%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_path.c.o
    [ 18%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_unixpath.c.o
    [ 19%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mf_wcomp.c.o
    [ 19%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mulalloc.c.o
    [ 20%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_alloc.c.o
    [ 20%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_compress.c.o
    [ 21%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_context.c.o
    [ 21%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_div.c.o
    [ 22%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_error.c.o
    [ 22%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_fopen.c.o
    [ 23%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_fstream.c.o
    [ 23%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_getwd.c.o
    [ 24%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_init.c.o
    [ 24%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_lib.c.o
    [ 25%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_malloc.c.o
    [ 25%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_messnc.c.o
    [ 26%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_net.c.o
    [ 27%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_once.c.o
    [ 27%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_open.c.o
    [ 28%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_port.c.o
    [ 28%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_pthread.c.o
    [ 29%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_read.c.o
    [ 29%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_realloc.c.o
    [ 30%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_seek.c.o
    [ 30%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_static.c.o
    [ 31%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_symlink.c.o
    [ 31%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_thr_init.c.o
    [ 32%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_write.c.o
    [ 32%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/mysql_async.c.o
    [ 33%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/password.c.o
    [ 33%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/str2int.c.o
    [ 34%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strcend.c.o
    [ 34%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strcont.c.o
    [ 35%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strend.c.o
    [ 36%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strfill.c.o
    [ 36%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/string.c.o
    [ 37%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strinstr.c.o
    [ 37%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strmake.c.o
    [ 38%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strmov.c.o
    [ 38%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strnmov.c.o
    [ 39%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strtoll.c.o
    [ 39%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strtoull.c.o
    [ 40%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strxmov.c.o
    [ 40%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/strxnmov.c.o
    [ 41%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/thr_mutex.c.o
    [ 41%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/typelib.c.o
    [ 42%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/sha1.c.o
    [ 42%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_stmt.c.o
    C:/Projects/AndroidMySQL/mariadb-connector-c-3.0.0-alpha-src/libmariadb/my_stmt.c: In function 'mysql_net_store_length':
    C:/Projects/AndroidMySQL/mariadb-connector-c-3.0.0-alpha-src/libmariadb/my_stmt.c:411:3: warning: right shift count >= width of type
       int8store(packet, length);
       ^
    [ 43%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_loaddata.c.o
    [ 44%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/my_stmt_codec.c.o
    [ 44%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/client_plugin.c.o
    [ 45%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/ma_io.c.o
    [ 45%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/secure/openssl.c.o
    [ 46%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/adler32.c.o
    [ 46%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/compress.c.o
    [ 47%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/crc32.c.o
    [ 47%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/deflate.c.o
    [ 48%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/gzclose.c.o
    [ 48%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/gzlib.c.o
    [ 49%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/gzread.c.o
    [ 49%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/gzwrite.c.o
    [ 50%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/infback.c.o
    [ 50%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/inffast.c.o
    [ 51%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/inflate.c.o
    [ 52%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/inftrees.c.o
    [ 52%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/trees.c.o
    [ 53%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/uncompr.c.o
    [ 53%] Building C object libmariadb/CMakeFiles/mariadb_obj.dir/__/zlib/zutil.c.o
    [ 53%] Built target mariadb_obj
    Scanning dependencies of target mariadbclient
    [ 54%] Linking C static library libmariadbclient.a
    [ 54%] Built target mariadbclient
    Scanning dependencies of target SYM_libmysqlclient.a
    [ 54%] Generating libmysqlclient.a
    failed to create symbolic link 'libmysqlclient.a': No error
    libmariadb/CMakeFiles/SYM_libmysqlclient.a.dir/build.make:60: recipe for target `libmariadb/libmysqlclient.a' failed
    make[2]: *** [libmariadb/libmysqlclient.a] Error 1
    CMakeFiles/Makefile2:189: recipe for target `libmariadb/CMakeFiles/SYM_libmysqlclient.a.dir/all' failed
    make[1]: *** [libmariadb/CMakeFiles/SYM_libmysqlclient.a.dir/all] Error 2
    Makefile:151: recipe for target `all' failed
    make: *** [all] Error 2
    
    devellopement1@POR-LAG45 /c/Projects/AndroidMySQL/mariadb-connector-c-3.0.0-alpha-src/build
    $ cp libmariadb/libmariadbclient.a libmariadb/libmysqlclient.a
    
    devellopement1@POR-LAG45 /c/Projects/AndroidMySQL/mariadb-connector-c-3.0.0-alpha-src/build
    $ cp libmariadb/libmariadbclient.a libmariadb/libmysqlclient_r.a
    
    devellopement1@POR-LAG45 /c/Projects/AndroidMySQL/mariadb-connector-c-3.0.0-alpha-src/build
    $ make
    [ 53%] Built target mariadb_obj
    [ 54%] Built target mariadbclient
    [ 54%] Built target SYM_libmysqlclient.a
    Scanning dependencies of target libmariadb
    [ 55%] Linking C shared library libmariadb.so
    c:/qt/5.10.1/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: error: C:/Strawberry/c/lib/libssl.a: member at 32460 is not an ELF object
    c:/qt/5.10.1/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: error: C:/Strawberry/c/lib/libssl.a: member at 43812 is not an ELF object
    c:/qt/5.10.1/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: error: C:/Strawberry/c/lib/libssl.a: member at 56338 is not an ELF object
    c:/qt/5.10.1/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: error: C:/Strawberry/c/lib/libssl.a: member at 62392 is not an ELF object
    c:/qt/5.10.1/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: error: C:/Strawberry/c/lib/libssl.a: member at 62960 is not an ELF object
    c:/qt/5.10.1/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: error: C:/Strawberry/c/lib/libssl.a: member at 78442 is not an ELF object
    c:/qt/5.10.1/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: error: C:/Strawberry/c/lib/libssl.a: member at 80112 is not an ELF object
    ....
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_verify_server_cert: error: undefined reference to 'X509_free'
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_verify_server_cert: error: undefined reference to 'X509_free'
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_get_cipher: error: undefined reference to 'SSL_get_current_cipher'
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_get_cipher: error: undefined reference to 'SSL_CIPHER_get_name'
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_get_finger_print: error: undefined reference to 'EVP_sha1'
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_get_finger_print: error: undefined reference to 'SSL_get_ex_data'
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_get_finger_print: error: undefined reference to 'SSL_get_peer_certificate'
    CMakeFiles/mariadb_obj.dir/secure/openssl.c.o:openssl.c:function ma_ssl_get_finger_print: error: undefined reference to 'X509_digest'
    collect2.exe: error: ld returned 1 exit status
    libmariadb/CMakeFiles/libmariadb.dir/build.make:272: recipe for target `libmariadb/libmariadb.so.3' failed
    make[2]: *** [libmariadb/libmariadb.so.3] Error 1
    CMakeFiles/Makefile2:263: recipe for target `libmariadb/CMakeFiles/libmariadb.dir/all' failed
    make[1]: *** [libmariadb/CMakeFiles/libmariadb.dir/all] Error 2
    Makefile:151: recipe for target `all' failed
    make: *** [all] Error 2
    

  • Lifetime Qt Champion

    Hi,

    Looks like you are missing an Android build of OpenSSL.

    By the way, please take a look again at the documentation of QSqlDatabase, you are really not using it the way it's intended.

    Also, accessing your database as the root user is a pretty bad idea.



  • thx for your answer ,

    The problem was due to the Pearl program at the time of the cmake it is going to look for the libraries "libcrypto.a" and "libssl.a" in this repertor instead of the directory ssl so I have now well "libmysqlclient.a" "libmysqlclient.so" "libmariadbclient.a" "libmariadb.so.so" "libmariadb.so.3"
    "Libmariadb.so"



  • I have now an other problems

    When a try to make the mysql.pro i have this error ,

    15:31:46: Exécution des étapes pour le projet mysql...
    15:31:46: Débute : "C:\Qt\5.10.1\mingw53_32\bin\qmake.exe" C:\Qt\5.10.1\Src\qtbase\src\plugins\sqldrivers\mysql\mysql.pro -spec win32-g++
    Project ERROR: Library 'mysql' is not defined.
    15:31:46: Le processus "C:\Qt\5.10.1\mingw53_32\bin\qmake.exe" s'est terminé avec le code 3.
    Erreur lors de la compilation/déploiement du projet mysql (kit : Desktop Qt 5.10.1 MinGW 32bit)
    When executing step "qmake"
    15:31:46: Temps écoulé : 00:00.
    

  • Lifetime Qt Champion

    The procedure has changed since at least 5.10. See the corresponding chapter in Qt's documentation.



  • Thx for you answer but didnt works same problems and i think that my libmariadb.so is corrupted or didnt work cause if i link this librairie in the program the apk crash .


  • Lifetime Qt Champion

    Are you trying to use your Android built MariaDB to build the MinGW plugin ?



  • yes , i try the App on NoSql DB mode dont work too but its appear that i havent got root permission for Database how can i fixe it


  • Lifetime Qt Champion

    You can't use libraries built for Android with MinGW.

    NoSQL is a complete different paradigm. How is that related to your current problem ?



  • @SGaist No related just try another method for validate 99% of my app . I return on MySQL so i build with on armeabi-v7a with libqsqlmysql.so for android . the app crash

    D/Zygote  (23930): CtrlSocket libc.so ctrl_sockets_set_addr pfunc is not exist!
    I/        (23930): power log dlsym ok
    I/ActivityManager( 1264): Start proc 23930:org.qtproject.example.TestMYSQL/u0a131 for activity org.qtproject.example.TestMYSQL/org.qtproject.qt5.android.bindings.QtActivity
    I/art     (23930): Late-enabling -Xcheck:jni
    D/ActivityThread(23930): ActivityThread,attachApplication
    D/ActivityManager( 1264): ActivityManagerService,attachApplication,callingPid = 23930
    V/ActivityManager( 1264): New app record ProcessRecord{6a964ae 23930:org.qtproject.example.TestMYSQL/u0a131} thread=android.os.BinderProxy@1a3aa12 pid=23930
    D/HwCust  (23930): Create obj success use class android.content.res.HwCustHwResourcesImpl
    V/HwPolicyFactory(23930): : success to get AllImpl object and return....
    V/ActivityThread(23930): ActivityThread,callActivityOnCreate
    V/HwWidgetFactory(23930): : successes to get AllImpl object and return....
    W/System  (23930): ClassLoader referenced unknown path:
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.15, mControlPoint1y = 0.7, mControlPoint2x = 0.2, mControlPoint2y = 0.98
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0
    V/BoostFramework(23930): mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
    V/BoostFramework(23930): mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
    V/BoostFramework(23930): mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
    V/BoostFramework(23930): mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
    V/BoostFramework(23930): mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
    V/BoostFramework(23930): BoostFramework() : mPerf = com.qualcomm.qti.Performance@f3abed0
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.15, mControlPoint1y = 0.7, mControlPoint2x = 0.2, mControlPoint2y = 0.98
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0
    V/BoostFramework(23930): BoostFramework() : mPerf = com.qualcomm.qti.Performance@706cec9
    I/QtCore  (23930): Start
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libQt5Gui.so: unused DT entry: type 0x1d arg 0x55c5c
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libQt5Widgets.so: unused DT entry: type 0x1d arg 0x6d119
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libQt5Widgets.so: unsupported flags DT_FLAGS_1=0x81
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libQt5Sql.so: unused DT entry: type 0x1d arg 0x6286
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libQt5Sql.so: unsupported flags DT_FLAGS_1=0x81
    W/linker  (23930): /data/data/org.qtproject.example.TestMYSQL/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unused DT entry: type 0x1d arg 0x8cd3
    W/linker  (23930): /data/data/org.qtproject.example.TestMYSQL/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
    I/Qt      (23930): qt start
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libqsqlmysql.so: unused DT entry: type 0x1d arg 0x15db8
    W/linker  (23930): /data/app/org.qtproject.example.TestMYSQL-1/lib/arm/libqsqlmysql.so: is missing DT_SONAME will use basename as a replacement: "libqsqlmysql.so"
    W/System.err(23930): java.lang.reflect.InvocationTargetException
    W/System.err(23930): 	at java.lang.reflect.Method.invoke(Native Method)
    W/System.err(23930): 	at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:241)
    W/System.err(23930): 	at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:676)
    W/System.err(23930): 	at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:183)
    W/System.err(23930): 	at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266)
    W/System.err(23930): 	at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273)
    W/System.err(23930): 	at android.app.Activity.performCreate(Activity.java:6367)
    W/System.err(23930): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    W/System.err(23930): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
    W/System.err(23930): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2511)
    W/System.err(23930): 	at android.app.ActivityThread.access$900(ActivityThread.java:165)
    W/System.err(23930): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1375)
    W/System.err(23930): 	at android.os.Handler.dispatchMessage(Handler.java:102)
    W/System.err(23930): 	at android.os.Looper.loop(Looper.java:150)
    W/System.err(23930): 	at android.app.ActivityThread.main(ActivityThread.java:5621)
    W/System.err(23930): 	at java.lang.reflect.Method.invoke(Native Method)
    W/System.err(23930): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
    W/System.err(23930): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
    W/System.err(23930): Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libmariadb.so" not found
    W/System.err(23930): 	at java.lang.Runtime.load(Runtime.java:344)
    W/System.err(23930): 	at java.lang.System.load(System.java:1079)
    W/System.err(23930): 	at org.qtproject.qt5.android.QtNative.loadBundledLibraries(QtNative.java:209)
    W/System.err(23930): 	at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:599)
    W/System.err(23930): 	... 18 more
    D/HwSensorManager(23930): HwSensorManager version: 1.0.0
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.15, mControlPoint1y = 0.7, mControlPoint2x = 0.2, mControlPoint2y = 0.98
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0
    V/BoostFramework(23930): BoostFramework() : mPerf = com.qualcomm.qti.Performance@f4b9283
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.15, mControlPoint1y = 0.7, mControlPoint2x = 0.2, mControlPoint2y = 0.98
    D/CubicBezierInterpolator(23930): CubicBezierInterpolator  mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0
    V/BoostFramework(23930): BoostFramework() : mPerf = com.qualcomm.qti.Performance@e237c00
    I/HwSecImmHelper(23930): mSecurityInputMethodService is null
    D/OpenGLRenderer(23930): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
    I/Adreno  (23930): QUALCOMM build                   : d28da0e, Iec24cdb30f
    I/Adreno  (23930): Build Date                       : 03/10/16
    I/Adreno  (23930): OpenGL ES Shader Compiler Version: XE031.06.00.05
    I/Adreno  (23930): Local Branch                     :
    I/Adreno  (23930): Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.BR.1.2.6_RB1.06.00.01.179.013
    I/Adreno  (23930): Remote Branch                    : NONE
    I/Adreno  (23930): Reconstruct Branch               : NOTHING
    I/OpenGLRenderer(23930): Initialized EGL, version 1.4
    I/HwSecImmHelper(23930): mSecurityInputMethodService is null
    V/AudioManager(23930): playSoundEffect   effectType: 0
    V/AudioManager(23930): querySoundEffectsEnabled...
    

  • Moderators

    @Lenawel said in Can You Help me Please , MySQL + Android on Qt:

    Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libmariadb.so" not found

    This is the problem



  • @jsulm said in Can You Help me Please , MySQL + Android on Qt:

    his is the problem

    thx for your answer , i check a los of time and the library is in the good PATH


  • Moderators

    @Lenawel In which path is it? Don't forget that libmariadb.so is loaded using dlopen().



  • @jsulm thx for answer .
    I work a little bit on this problem i pass this problem but have an other one i dont know why this problem appear cause i use only Qt 5.10 and not 5.3 if you want try something i can drop my projects

    I/ActivityManager(  412): Start proc 3420:org.qtproject.example/u0a519 for activity org.qtproject.example/org.qtproject.qt5.android.bindings.QtActivity
    I/art     ( 3420): Late-enabling -Xcheck:jni
    I/QtCore  ( 3420): Start
    W/linker  ( 3420): libQt5Gui.so: unused DT entry: type 0x1d arg 0x55c5c
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5Widgets.so: unused DT entry: type 0x1d arg 0x6d119
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5PrintSupport.so: unused DT entry: type 0x1d arg 0xb762
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5Network.so: unused DT entry: type 0x1d arg 0x13f76
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5Qml.so: unused DT entry: type 0x1d arg 0x39f24
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5Quick.so: unused DT entry: type 0x1d arg 0x4a9e4
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5QuickParticles.so: unused DT entry: type 0x1d arg 0x55d7
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5QuickWidgets.so: unused DT entry: type 0x1d arg 0x3034
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5Multimedia.so: unused DT entry: type 0x1d arg 0x18fab
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5Sql.so: unused DT entry: type 0x1d arg 0x6286
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libQt5MultimediaQuick.so: unused DT entry: type 0x1d arg 0x32a0
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libqtforandroid.so: unused DT entry: type 0x1d arg 0x8cd3
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    I/Qt      ( 3420): qt start
    W/linker  ( 3420): libqandroidbearer.so: unused DT entry: type 0x1d arg 0x1711
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libqtmedia_android.so: unused DT entry: type 0x1d arg 0x56f4
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libRegisterVisit.so: unused DT entry: type 0x1d arg 0x2cf2
    D/        ( 3420): (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
    D/OpenGLRenderer( 3420): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
    D/Atlas   ( 3420): Validating map...
    I/OpenGLRenderer( 3420): Initialized EGL, version 1.4
    D/OpenGLRenderer( 3420): Enabling debug mode 0
    D/mali_winsys( 3420): new_window_surface returns 0x3000
    W/linker  ( 3420): libqandroidstyle.so: unused DT entry: type 0x1d arg 0x44b9
    W/linker  ( 3420): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3420): libqsqlmysql.so: unused DT entry: type 0x1d arg 0x15db8
    F/libRegisterVisit.so( 3420): (null):0 ((null)): Cannot mix incompatible Qt library (version 0x50302) with this library (version 0x50a01)
    F/libc    ( 3420): Fatal signal 6 (SIGABRT), code -6 in tid 3448 (QtMainThread)
    I/DEBUG   (  128): pid: 3420, tid: 3448, name: QtMainThread  >>> org.qtproject.example <<<
    I/Zygote  (  136): Process 3420 exited due to signal (6)
    I/ActivityManager(  412): Process org.qtproject.example (pid 3420) has died
    
    
    "org.qtproject.example" died.
    

  • Moderators

    @Lenawel Somehow you're mixing two different Qt version, but I don't know how this is happening.
    Did you build libqsqlmysql.so by yourself? If so which Qt version did you use?



  • @jsulm
    no it's my work mate who build it (5.0.3) but i delete libqsqmysql.so and replace it by libmariadb.so that i build myself (5.10.1) : another error .I can drop my project if you want try by yourself

    I/art     ( 3768): Late-enabling -Xcheck:jni
    I/ActivityManager(  412): Start proc 3768:org.qtproject.example/u0a519 for activity org.qtproject.example/org.qtproject.qt5.android.bindings.QtActivity
    I/QtCore  ( 3768): Start
    W/linker  ( 3768): libQt5Gui.so: unused DT entry: type 0x1d arg 0x55c5c
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5Widgets.so: unused DT entry: type 0x1d arg 0x6d119
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5PrintSupport.so: unused DT entry: type 0x1d arg 0xb762
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5Network.so: unused DT entry: type 0x1d arg 0x13f76
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5Qml.so: unused DT entry: type 0x1d arg 0x39f24
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5Quick.so: unused DT entry: type 0x1d arg 0x4a9e4
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5QuickParticles.so: unused DT entry: type 0x1d arg 0x55d7
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5QuickWidgets.so: unused DT entry: type 0x1d arg 0x3034
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5Multimedia.so: unused DT entry: type 0x1d arg 0x18fab
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5Sql.so: unused DT entry: type 0x1d arg 0x6286
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libQt5MultimediaQuick.so: unused DT entry: type 0x1d arg 0x32a0
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqtforandroid.so: unused DT entry: type 0x1d arg 0x8cd3
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    I/Qt      ( 3768): qt start
    W/linker  ( 3768): libqandroidbearer.so: unused DT entry: type 0x1d arg 0x1711
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqtmedia_android.so: unused DT entry: type 0x1d arg 0x56f4
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libRegisterVisit.so: unused DT entry: type 0x1d arg 0x2cf2
    D/        ( 3768): (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
    D/OpenGLRenderer( 3768): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
    D/Atlas   ( 3768): Validating map...
    I/OpenGLRenderer( 3768): Initialized EGL, version 1.4
    D/OpenGLRenderer( 3768): Enabling debug mode 0
    D/mali_winsys( 3768): new_window_surface returns 0x3000
    W/linker  ( 3768): libqandroidstyle.so: unused DT entry: type 0x1d arg 0x44b9
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/libRegisterVisit.so( 3768): (null):0 ((null)): QSqlDatabase: QMYSQL driver not loaded
    W/libRegisterVisit.so( 3768): (null):0 ((null)): QSqlDatabase: available drivers: QSQLITE
    W/linker  ( 3768): libqgif.so: unused DT entry: type 0x1d arg 0x7f9
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqicns.so: unused DT entry: type 0x1d arg 0xcc8
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqico.so: unused DT entry: type 0x1d arg 0xaea
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqjpeg.so: unused DT entry: type 0x1d arg 0x1052
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqtga.so: unused DT entry: type 0x1d arg 0x7fc
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqtiff.so: unused DT entry: type 0x1d arg 0xb8a
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqwbmp.so: unused DT entry: type 0x1d arg 0x8f0
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    W/linker  ( 3768): libqwebp.so: unused DT entry: type 0x1d arg 0x148c
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    D/mali_winsys( 3768): new_window_surface returns 0x3000
    D/mali_winsys( 3768): new_window_surface returns 0x3000
    W/linker  ( 3768): libqtaudio_opensles.so: unused DT entry: type 0x1d arg 0x17e0
    W/linker  ( 3768): Unsupported flags DT_FLAGS_1=0x81
    

  • Moderators

    @Lenawel said in Can You Help me Please , MySQL + Android on Qt:

    libqsqmysql.so and replace it by libmariadb.so

    these two are not the same. First one is the Qt plugin to support MySQL, it requires libmariadb.so or libmysql.so to work. If you delete libqsqmysql.so you will not be able to use MySQL.



  • @jsulm said in Can You Help me Please , MySQL + Android on Qt:

    libqsqmysql.so

    And can you tell me How can i make libqsqlmysql.so in 5.10.1 on Windows for Android please ?


  • Moderators

    @Lenawel Sorry, I never built Qt for Android. You should first check whether it is already part of official Qt for Android build.





  • Ok i try with this link to compile but i have problems on steps "CompilingMaria"

    developpement1@POR-LAG45 /c/AndroidMysql/mariadb-connector-c-3.0.0-alpha-src/build
    $ PKG_CONFIG_PATH=$SR/usr/lib/pkgconfig cmake -DCMAKE_AR="$BR"ar -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_C
    OMPILER="$BR"gcc -DCMAKE_C_FLAGS=--sysroot=$SR -DCMAKE_INSTALL_PREFIX=$SR/usr -DCMAKE_LINKER="$BR"ld -D
    CMAKE_NM="$BR"nm -DCMAKE_OBJCOPY="$BR"objcopy -DCMAKE_OBJDUMP="$BR"objdump -DCMAKE_RANLIB="$BR"ranlib -
    DCMAKE_STRIP="$BR"strip -DWITH_EXTERNAL_ZLIB=ON -DICONV_INCLUDE_DIR=$SR/usr/include -DICONV_LIBRARIES=$
    SR/usr/lib/libiconv.a -DZLIB_INCLUDE_DIR=$SR/usr/include -DZLIB_LIBRARY=$SR/usr/lib/libz.so ../
    
    -- The C compiler identification is GNU 4.8.0
    CMake Error at CMakeLists.txt:5 (PROJECT):
      The CMAKE_C_COMPILER:
    
        c:/Qt/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc
    
      is not a full path to an existing compiler tool.
    
      To use the NMake generator with Visual C++, cmake must be run from a shell
      that can use the compiler cl from the command line.  This environment is
      unable to invoke the cl compiler.  To fix this problem, run cmake from the
      Visual Studio Command Prompt (vcvarsall.bat).
    
      Tell CMake where to find the compiler by setting either the environment
      variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
      the compiler, or to the compiler name if it is in the PATH.
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/AndroidMysql/mariadb-connector-c-3.0.0-alpha-src/build/CMakeFiles/CMakeOutput.log".
    See also "C:/AndroidMysql/mariadb-connector-c-3.0.0-alpha-src/build/CMakeFiles/CMakeError.log".
    


  • Dear Lenawel
    I search many times and try many times, fail !
    Do you have good new on it?
    Best regards,
    jeff


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.