Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Error creating MySQL drivers for QT5.1(mysql.h no such file)

$
0
0
Hi. I’m trying create the drivers for MySQL to connect to QT5.1. Below is my set-up process and the error that it picks up, mysql.h no such file. Setting up environment for Qt usage… C:\Qt51\5.1.0\mingw48_32>set mysql=C:\Program Files (x86)\MySQL\MySQL Server 5.5 C:\Qt51\5.1.0\mingw48_32>cd C:\Qt51\5.1.0\Src\qtbase\src\plugins\sqldrivers\mysq l C:\Qt51\5.1.0\Src\qtbase\src\plugins\sqldrivers\mysql>qmake “INCLUDEPATH+=%mysql server 5.5%\\include” “LIBS+=%mysql server 5.5%\\lib\\libmysql.lib” -o Makefile mysql.pro C:\Qt51\5.1.0\Src\qtbase\src\plugins\sqldrivers\mysql>mingw32-make mingw32-make -f Makefile.Release all mingw32-make1: Entering directory ‘C:/Qt51/5.1.0/Src/qtbase/src/plugins/sqldri vers/mysql’ g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W all -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCE PTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I”%mysql” -I“se rver” -I“5.5%\include” -I“C:\Qt51\5.1.0\mingw48_32\include” -I“C:\Qt51\5.1.0\min gw48_32\include\QtSql” -I“C:\Qt51\5.1.0\mingw48_32\include\QtSql\5.1.0” -I“C:\Qt 51\5.1.0\mingw48_32\include\QtSql\5.1.0\QtSql” -I“C:\Qt51\5.1.0\mingw48_32\inclu de\QtCore” -I“C:\Qt51\5.1.0\mingw48_32\include\QtCore\5.1.0” -I“C:\Qt51\5.1.0\mi ngw48_32\include\QtCore\5.1.0\QtCore” -I”.moc\release_shared” -I”..\..\..\..\mks pecs\win32-g++” -o .obj\release_shared\main.o main.cpp In file included from main.cpp:44:0: ../../../sql/drivers/mysql/qsql_mysql_p.h:63:19: fatal error: mysql.h: No such f ile or directory #include <mysql.h> ^ compilation terminated. Makefile.Release:497: recipe for target ‘.obj/release_shared/main.o’ failed mingw32-make1: *** [.obj/release_shared/main.o] Error 1 mingw32-make1: Leaving directory ‘C:/Qt51/5.1.0/Src/qtbase/src/plugins/sqldriv ers/mysql’ makefile:38: recipe for target ‘release-all’ failed mingw32-make: *** [release-all] Error 2 C:\Qt51\5.1.0\Src\qtbase\src\plugins\sqldrivers\mysql> The mysql.h file is located in, C:\Program Files (x86)\MySQL\MySQL Server 5.5\include folder. What I’m I doing wrong? Is something missing? {I have Win7 64 bit, MySQL Server5.5 (32bit) & QT5.1 with Qt Creator 2.72 (32Bit)}

Viewing all articles
Browse latest Browse all 2113

Trending Articles