Setting up environment for Qt usage...C:\Qt\5.4\mingw491_32>cd C:\Qt\5.4\src\qtbase\src\plugins\sqldrivers\mysqlC:\Qt\5.4\Src\qtbase\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=$$quote(c:\MySQL\MySQL Server 5.6\include)" "LIBS+=$$quote(c:\MySQL\MySQL Server 5.6\lib\libmysql.lib)" mysql.proC:\Qt\5.4\Src\qtbase\src\plugins\sqldrivers\mysql>mingw32-make.exemingw32-make.exe -f Makefile.Release allmingw32-make.exe[1]: Entering directory 'C:/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql'g++ -Wl,-s -shared -Wl,-subsystem,windows -Wl,--out-implib,C:\Qt\5.4\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:\MySQL\MySQL Server 5.6\lib\libmysql.lib" -LC:/Qt/5.4/mingw491_32/lib -lQt5Sql -lQt5Core .obj\release\qsqlmysql_resource_res.o.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x160): undefined reference to `mysql_num_rows@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x18b): undefined reference to `mysql_stmt_num_rows@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x22a): undefined reference to `mysql_num_rows@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x257): undefined reference to `mysql_stmt_num_rows@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x29e): undefined reference to `mysql_stmt_insert_id@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2da): undefined reference to `mysql_insert_id@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x608): undefined reference to `mysql_character_set_name@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x869): undefined reference to `mysql_errno@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x880): undefined reference to `mysql_field_seek@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x8ac): undefined reference to `mysql_field_seek@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x8b7): undefined reference to `mysql_fetch_field@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x8ff): undefined reference to `mysql_fetch_field@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x931): undefined reference to `mysql_error@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x940): undefined reference to `mysql_errno@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xaba): undefined reference to `mysql_errno@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xb21): undefined reference to `mysql_stmt_error@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xb2e): undefined reference to `mysql_stmt_errno@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xce0): undefined reference to `mysql_stmt_data_seek@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xcf1): undefined reference to `mysql_stmt_fetch@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xd5e): undefined reference to `mysql_data_seek@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xd6f): undefined reference to `mysql_fetch_row@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xe90): undefined reference to `mysql_fetch_row@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0xed7): undefined reference to `mysql_stmt_fetch@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x1117): undefined reference to`mysql_fetch_lengths@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x228e): undefined reference to`mysql_init@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2419): undefined reference to`mysql_real_connect@32'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2632): undefined reference to`mysql_close@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x284f): undefined reference to`mysql_real_connect@32'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x28c1): undefined reference to`mysql_set_character_set@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x28d4): undefined reference to`mysql_get_client_version@0'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x28ed): undefined reference to`mysql_thread_init@0'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x29be): undefined reference to`mysql_select_db@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2aeb): undefined reference to`mysql_close@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2b8b): undefined reference to`mysql_get_server_version@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2bbb): undefined reference to`mysql_options@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2c34): undefined reference to`mysql_thread_end@0'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x2c3f): undefined reference to`mysql_close@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3239): undefined reference to`mysql_list_fields@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3296): undefined reference to`mysql_fetch_field@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x32a5): undefined reference to`mysql_free_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x336a): undefined reference to`mysql_query@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x34aa): undefined reference to`mysql_query@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x35ea): undefined reference to`mysql_query@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3866): undefined reference to`mysql_get_server_version@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3cf3): undefined reference to`mysql_list_tables@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3d3b): undefined reference to`mysql_data_seek@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3d46): undefined reference to`mysql_fetch_row@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x3f46): undefined reference to`mysql_free_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x431b): undefined reference to`mysql_num_fields@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4414): undefined reference to`mysql_fetch_field@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4504): undefined reference to`mysql_stmt_result_metadata@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4537): undefined reference to`mysql_free_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4558): undefined reference to`mysql_next_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4575): undefined reference to`mysql_stmt_close@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x459b): undefined reference to`mysql_free_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4654): undefined reference to`mysql_store_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x49cf): undefined reference to`mysql_real_query@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4ac0): undefined reference to`mysql_store_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4ae5): undefined reference to`mysql_field_count@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4b27): undefined reference to`mysql_affected_rows@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4bdc): undefined reference to`mysql_fetch_field_direct@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4c7e): undefined reference to`mysql_field_count@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4e57): undefined reference to`mysql_next_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4e7f): undefined reference to`mysql_store_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4e99): undefined reference to`mysql_field_count@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x4fbb): undefined reference to`mysql_free_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x50c7): undefined reference to`mysql_affected_rows@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x515b): undefined reference to`mysql_fetch_field_direct@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5324): undefined reference to`mysql_stmt_prepare@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x533d): undefined reference to`mysql_stmt_param_count@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x53a7): undefined reference to`mysql_stmt_init@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x556a): undefined reference to`mysql_stmt_param_count@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5646): undefined reference to`mysql_stmt_reset@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x584e): undefined reference to`mysql_stmt_param_count@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x586b): undefined reference to`mysql_stmt_execute@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x59da): undefined reference to`mysql_stmt_affected_rows@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5a0e): undefined reference to`mysql_stmt_bind_result@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5a35): undefined reference to`mysql_stmt_store_result@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5a6b): undefined reference to`mysql_stmt_bind_result@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5ab3): undefined reference to`mysql_stmt_param_count@4'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x5e18): undefined reference to`mysql_stmt_bind_param@8'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x62ab): undefined reference to`mysql_stmt_attr_set@12'.obj/release/qsql_mysql.o:qsql_mysql.cpp:(.text+0x63b2): undefined reference to`mysql_real_escape_string@16'C:/Qt/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: .obj/release/qsql_mysql.o: bad reloc address 0x4 in section `.data'collect2.exe: error: ld returned 1 exit statusMakefile.Release:81: recipe for target '..\..\..\..\plugins\sqldrivers\qsqlmysql.dll' failedmingw32-make.exe[1]: *** [..\..\..\..\plugins\sqldrivers\qsqlmysql.dll] Error 1mingw32-make.exe[1]: Leaving directory 'C:/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql'makefile:38: recipe for target 'release-all' failedmingw32-make.exe: *** [release-all] Error 2
g++ -shared -Wl,-subsystem,windows -Wl,--out-implib,\plugins\sqldrivers\libqsqlmysqld.a -o \plugins\sqldrivers\qsqlmysqld.dll .obj/debug/main.o .obj/debug/qsql_mysql.o .obj/debug/moc_qsql_mysql_p.o -llibmysql C:/MYSQL/lib/libmysql.lib -LC:/Qt/5.4/mingw491_32/lib -lQt5Sqld -lQt5Cored .obj\debug\qsqlmysqld_resource_res.o [color=red]C:/Qt/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibmysql[/color]
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL", "mydb");