"Cannot find file: mysql.pro" while building MySQL driver in Qt



  • Hello everyone. I'm totally frustrated after tonns of tries on making connection between Qt and MySQL. I reinstalled both of them for many times and I saw different types of errors while I was trying to make connection MySQL&Qt. Right now I have such situation.
    I enter such commands in cmd
    C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql>qmake "INCLUDEPATH+=C:\MySQL-insalldir\MySQL Server 5.7\include" "LIBS+=C:\MySQL-insalldir\MySQL Server 5.7\lib\libmysql.lib" mysql.pro

    and i'm getting such error:
    Cannot find file: mysql.pro.

    I have all the pathes environment variables and i'm stucked on what I'm actually doing wrong.
    Please, help me.


  • Moderators

    @CrowSun said in "Cannot find file: mysql.pro" while building MySQL driver in Qt:

    C:\MySQL-insalldir\MySQL Server 5.7

    You actually need the path to MySQL client library, not the server.
    Does C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql contain mysql.pro?



  • Can you please clarify where MySQL client library usually locates? I made everything as in docs and Installer puts in installation and data folders a folder named MySQL Server. So all needed libs (such as "...\include" and libmysql.lib) are located in that directives.
    And yes, there is no mysql.pro in " C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql" and that was also strange to me, because in my previous installation that path definitely contained that file. But it was another strange error which pushes me to reinstall Qt and MySQL. And now I get that error, that I described in the topic.


  • Qt Champions 2017

    Hi
    Just a note/question.
    If you do not select the source part in the installer. Will
    the mysql.pro be there ?
    alt text



  • @jsulm I forgot to reply on you message, when I answered to you.


  • Moderators



  • @jsulm I already have mysql connector. It was installed into Program Files folder by default. Actually installer doesnt even offers me choice of path. But, I tried that one:
    C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql>qmake "INCLUDEPATH+=C:\Program Files\MySQL\MySQL Connector C 6.1\include" "LIBS+=C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib" mysql.pro
    and get the same "Cannot find file: mysql.pro." mistake


  • Qt Champions 2017

    Hi
    And the mysql.pro file are in
    C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql ?


  • Moderators

    @CrowSun Well, it doesn't make sense to call qmake as long as you don't have mysql.pro file.
    How did you install Qt source code?



  • @mrjj I have only 3 files in that folder and it is:
    qsql_mysql_p.h
    qsql_mysql.pri
    qsql_mysql.cpp

    @jsulm i have downloaded file "qt-unified-windows-x86-3.0.2-online" and then just went through installation. I chose almost all components and Source part too.

    Hope you can help me...
    Big thank to all of you for replyings and not ignoring my problem!


  • Lifetime Qt Champion

    Hi,

    As an alternative, you can download the 5.7.1 source for Windows from here and check with that one.



  • @SGaist Okay, so I replaced components from my folder C:\Qt\5.7\Src with the components from that zip file and than I tried 2 commands below with such results:

    "C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql>qmake C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql>qmake "INCLUDEPATH+=C:\MySQL-insalldir\MySQL Server 5.7\include" "LIBS+=C:\MySQL-insalldir\MySQL Server 5.7\lib\libmysql.lib" mysql.pro
    Cannot read C:/Qt/5.7/Src/qtbase/src/sql/drivers/mysql: ???????? ? ???????.
    Error processing project file: C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql
    Cannot find file: mysql.pro."

    and this

    "C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql>qmake "INCLUDEPATH+=C:\Program Files\MySQL\MySQL Connector C 6.1\include" "LIBS+=C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib" mysql.pro
    Cannot find file: mysql.pro."

    :(


  • Qt Champions 2017

    @CrowSun
    and
    cd C:\Qt\5.7\Src\qtbase\src\sql\drivers\mysql
    type mysql.pro
    lists the file ?


  • Lifetime Qt Champion

    Just in case, I've checked the content of the zip file and the /qtbase/src/plugins/sqldrivers/mysql/ folder contains mysql.pro.



  • @SGaist I actually find my super silly mistake. When I type command from C:\Qt\5.7\Src\qtbase\src\plugins\sqldrivers\mysql> command began to executing. BUT... then I get another error.
    So the picture looks like that:

    "C:\Qt\5.7\Src\qtbase\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:\Program Files\MySQL\MySQL Connector C 6.1\include" "LIBS+=C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib" mysql.pro
    Info: creating stash file C:\Qt\5.7\Src\qtbase.qmake.stash"

    than I entered command:
    "C:\Qt\5.7\Src\qtbase\src\plugins\sqldrivers\mysql>mingw32-make"

    and get that error:

    "mingw32-make -f Makefile.Release all
    mingw32-make[1]: Entering directory 'C:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql'
    C:\Qt\5.7\mingw53_32\bin\moc.exe -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D__GNUC__ -DWIN32 -IC:/Qt/5.7/Src/qtbase/mkspecs/win32-g++ -IC:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql -IC:/Program -IC:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql/Files/MySQL/MySQL -IC:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql/Connector -IC:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql/C -IC:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql/6.1/include -IC:/Qt/5.7/mingw53_32/include/QtSql/5.7.1 -IC:/Qt/5.7/mingw53_32/include/QtSql/5.7.1/QtSql -IC:/Qt/5.7/mingw53_32/include/QtCore/5.7.1 -IC:/Qt/5.7/mingw53_32/include/QtCore/5.7.1/QtCore -IC:/Qt/5.7/mingw53_32/include -IC:/Qt/5.7/mingw53_32/include/QtSql -IC:/Qt/5.7/mingw53_32/include/QtCore -IC:/Qt/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include -IC:/Qt/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed -IC:/Qt/Tools/mingw530_32/i686-w64-mingw32/include -IC:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/c++ -IC:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 -IC:/Qt/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward main.cpp -o .moc\release\main.moc
    g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -frtti -Wall -Wextra -Wvla -Wdate-time -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Program -IFiles\MySQL\MySQL -IConnector -IC -I6.1\include -IC:\Qt\5.7\mingw53_32\include\QtSql\5.7.1 -IC:\Qt\5.7\mingw53_32\include\QtSql\5.7.1\QtSql -IC:\Qt\5.7\mingw53_32\include\QtCore\5.7.1 -IC:\Qt\5.7\mingw53_32\include\QtCore\5.7.1\QtCore -IC:\Qt\5.7\mingw53_32\include -IC:\Qt\5.7\mingw53_32\include\QtSql -IC:\Qt\5.7\mingw53_32\include\QtCore -I.moc\release -IC:/utils/my_sql/my_sql/include -IC:/utils/postgresql/pgsql/include -IC:/openssl/include -I........\mkspecs\win32-g++ -o .obj\release\main.o main.cpp
    In file included from main.cpp:42:0:
    ../../../sql/drivers/mysql/qsql_mysql_p.h:60:19: fatal error: mysql.h: No such file or directory
    compilation terminated.
    Makefile.Release:322: recipe for target '.obj/release/main.o' failed
    mingw32-make[1]: *** [.obj/release/main.o] Error 1
    mingw32-make[1]: Leaving directory 'C:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql'
    Makefile:38: recipe for target 'release-all' failed
    mingw32-make: *** [release-all] Error 2"

    I already searched info about that mistake and someone says that this is a qt bug. Is it true?


  • Lifetime Qt Champion

    You'll likely have to escape the spaces in the path. Or use the good old 8.3 notation. By the way, use forward slashes for your path. Qt will handle conversion for your properly.



  • @mrjj I found mysql.pro in C:\Qt\5.7\Src\qtbase\src\plugins\sqldrivers\mysql and now I'm stacked with a new problem, which I described higher in my previous message.



  • @SGaist There isso much spaces in MySql folders by default. Idk how to avoid them properly.
    Anyway, i tries with forward slashes:
    "C:\Qt\5.7\Src\qtbase\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:/Program Files/MySQL/MySQL Connector C 6.1/include" "LIBS+=C:/Program Files/MySQL/MySQL Connector C 6.1/lib/libmysql.lib" mysql.pro"

    and get the same error...I made something wrong again?

    p.s. sorry, but what is that 8.3 notation? never heard before (shame on me)



  • @SGaist will it became a solution for my problem if I'll take all needed folders(include) and libs(libmysql.lib) to another created folder without spaces and use this new pathes in my command? Will it work or it will cause just a new problems?


  • Lifetime Qt Champion

    https://en.wikipedia.org/wiki/8.3_filename

    It should be good to build the plugin.



  • @SGaist so that solution is valid? to replace files in folder.
    Or I should avoid it and try an 8.3 notation?


  • Lifetime Qt Champion

    Replace ? I thought you wanted to copy the headers and libraries in their own folder without spaces. That or the notation should both work.



  • @SGaist I made a try with copying only now and in the end of that huge text block I receive an error.

    C:\Qt\5.7\Src\qtbase\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:\MySQLDev\include" "LIBS+=C:\MySQLDev\lib\libmysql.lib" mysql.pro

    C:\Qt\5.7\Src\qtbase\src\plugins\sqldrivers\mysql>mingw32-make

    mingw32-make -f Makefile.Release all
    mingw32-make[1]: Entering directory 'C:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql'
    g++ -Wl,-s -shared -Wl,-subsystem,windows -Wl,--out-implib,C:\Qt\5.7\Src\qtbase\plugins\sqldrivers\libqsqlmysql.a -o ........\plugins\sqldrivers\qsqlmysql.dll .obj/release/main.o .obj/release/qsql_mysql.o .obj/release/moc_qsql_mysql_p.o C:\MySQLDev\lib\libmysql.lib -LC:\Qt\5.7\mingw53_32\lib C:\Qt\5.7\mingw53_32\lib\libQt5Sql.a C:\Qt\5.7\mingw53_32\lib\libQt5Core.a -LC:\utils\my_sql\my_sql\lib -LC:\utils\postgresql\pgsql\lib .obj\release\qsqlmysql_resource_res.o
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x16e): undefined reference to mysql_num_rows@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x199): undefined reference tomysql_stmt_num_rows@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x22d): undefined reference to mysql_num_rows@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x257): undefined reference tomysql_stmt_num_rows@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x458): undefined reference to mysql_character_set_name@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4f1): undefined reference tomysql_stmt_error@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4fe): undefined reference to mysql_stmt_errno@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x751): undefined reference tomysql_error@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x760): undefined reference to mysql_errno@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x8ba): undefined reference tomysql_errno@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x99e): undefined reference to mysql_errno@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x9b5): undefined reference tomysql_field_seek@8'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x9dc): undefined reference to mysql_field_seek@8' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x9e7): undefined reference tomysql_fetch_field@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xa2c): undefined reference to mysql_fetch_field@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xae9): undefined reference tomysql_stmt_insert_id@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xb29): undefined reference to mysql_insert_id@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xd33): undefined reference tomysql_fetch_row@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xd77): undefined reference to mysql_stmt_fetch@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xe92): undefined reference tomysql_stmt_data_seek@12'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xea0): undefined reference to mysql_stmt_fetch@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xf0e): undefined reference tomysql_data_seek@12'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xf1c): undefined reference to mysql_fetch_row@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x10e7): undefined reference tomysql_fetch_lengths@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2728): undefined reference to mysql_init@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x288e): undefined reference tomysql_ssl_set@24'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2a99): undefined reference to mysql_real_connect@32' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2ba4): undefined reference tomysql_close@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2eab): undefined reference to mysql_set_character_set@8' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2ec2): undefined reference tomysql_get_client_version@0'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2ee0): undefined reference to mysql_thread_init@0' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2f52): undefined reference tomysql_real_connect@32'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x315e): undefined reference to mysql_ssl_set@24' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x31cb): undefined reference tomysql_options@12'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x31fb): undefined reference to mysql_options@12' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x322b): undefined reference tomysql_options@12'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3474): undefined reference to mysql_select_db@8' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x35b6): undefined reference tomysql_close@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x35d6): undefined reference to mysql_options@12' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x35f4): undefined reference tomysql_get_server_version@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x39f4): undefined reference to mysql_thread_end@0' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x39ff): undefined reference tomysql_close@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3fc9): undefined reference to mysql_list_fields@12' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4026): undefined reference tomysql_fetch_field@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4035): undefined reference to mysql_free_result@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x41ca): undefined reference tomysql_query@8'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x430a): undefined reference to mysql_query@8' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x444a): undefined reference tomysql_query@8'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x46d6): undefined reference to mysql_get_server_version@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4ae3): undefined reference tomysql_list_tables@8'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4b21): undefined reference to mysql_data_seek@12' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4b2c): undefined reference tomysql_fetch_row@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4c14): undefined reference to mysql_free_result@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4da7): undefined reference tomysql_free_result@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4e1d): undefined reference to mysql_next_result@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4e37): undefined reference tomysql_stmt_close@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4e5b): undefined reference to mysql_free_result@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4f59): undefined reference tomysql_store_result@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4f6c): undefined reference to mysql_free_result@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5194): undefined reference tomysql_real_query@12'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x52f9): undefined reference to mysql_store_result@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x537f): undefined reference tomysql_field_count@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x53ed): undefined reference to mysql_affected_rows@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x547c): undefined reference tomysql_fetch_field_direct@8'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x553e): undefined reference to mysql_field_count@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x55cb): undefined reference tomysql_num_fields@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x56c4): undefined reference to mysql_fetch_field@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x57b6): undefined reference tomysql_stmt_result_metadata@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5a3e): undefined reference to mysql_next_result@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5a8f): undefined reference tomysql_store_result@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5ad2): undefined reference to mysql_field_count@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5c2a): undefined reference tomysql_free_result@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5cc6): undefined reference to mysql_affected_rows@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5d5c): undefined reference tomysql_fetch_field_direct@8'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5ecc): undefined reference to mysql_stmt_prepare@12' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5ffb): undefined reference tomysql_stmt_init@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x60f7): undefined reference to mysql_stmt_param_count@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x6169): undefined reference tomysql_stmt_param_count@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x623d): undefined reference to mysql_stmt_reset@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x640b): undefined reference tomysql_stmt_param_count@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x6425): undefined reference to mysql_stmt_execute@4' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x6576): undefined reference tomysql_stmt_affected_rows@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x65a3): undefined reference to mysql_stmt_bind_result@8' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x65cb): undefined reference tomysql_stmt_store_result@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x65f9): undefined reference to mysql_stmt_bind_result@8' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x663e): undefined reference tomysql_stmt_param_count@4'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x68c2): undefined reference to mysql_stmt_bind_param@8' .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x6df1): undefined reference tomysql_stmt_attr_set@12'
    .obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x7099): undefined reference to `mysql_real_escape_string@16'
    collect2.exe: error: ld returned 1 exit status
    Makefile.Release:65: recipe for target '........\plugins\sqldrivers\qsqlmysql.dll' failed
    mingw32-make[1]: *** [........\plugins\sqldrivers\qsqlmysql.dll] Error 1
    mingw32-make[1]: Leaving directory 'C:/Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql'
    Makefile:38: recipe for target 'release-all' failed
    mingw32-make: *** [release-all] Error 2


  • Lifetime Qt Champion

    Are you sure that your MySQL library is built for MinGW ?



  • @SGaist i'm so ashamed of my non-acquaintance, but no, I'm not sure.
    I have installed it with a "mysql-installer-community-5.7.21.0.msi" which I downloaded from official site.
    How I can figure out that my MySQL library is for MinGW?


  • Lifetime Qt Champion

    You can use Dependency Walker to see if it depends on the Visual Studio runtime.


  • Lifetime Qt Champion

    One other thing to check is whether your library is 32 or 64 bit.



  • @SGaist I suggest, that I need a 32bit library for mingw?



  • @SGaist I uninstalled mySql from my pc and than I downloaded MySql community Server for windows 32bit (btw I have a 64bit windows). Than I unpacked zip archive in a folder without spaces and entered all previous commands in console. And FINALLY it all executed without errors.
    Thanks to everyone who replied on my topic and thank you SGaist for all answers and patience!



  • @CrowSun
    Could you give me a details for build mysql for android on windows ?
    I am using window10 x64 qt5.10.1(vs2015) mysql-connector-c-6.1.11-winx64.zip
    Could make a one step by step instruction ?
    Best regards,
    jeff


Log in to reply
 

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