MySQL Forums
Forum List  »  Install & Repo

error with mysql.h file missing(mysql driver for QT5)
Posted by: Des Govender
Date: September 01, 2013 01:00PM

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\my sql
C:\Qt51\5.1.0\Src\qtbase\src\plugins\sqldrivers\my sql>qmake "INCLUDEPATH+=%mysqlserver 5.5%\\include" "LIBS+=%mysql server 5.5%\\lib\\libmysql.lib" -o Makefilemysql.pro
C:\Qt51\5.1.0\Src\qtbase\src\plugins\sqldrivers\my sql>mingw32-makemingw32-make -f Makefile.Release allmingw32-make[1]: Entering directory 'C:/Qt51/5.1.0/Src/qtbase/src/plugins/sqldrivers/mysql'g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -Wall -Wextra -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. -I"%mysql" -I"server" -I"5.5%\include" -I"C:\Qt51\5.1.0\mingw48_32\include" -I"C:\Qt51\5.1.0\mingw48_32\include\QtSql" -I"C:\Qt51\5.1.0\mingw48_32\include\QtSql\5.1.0" -I"C:\Qt51\5.1.0\mingw48_32\include\QtSql\5.1.0\QtSql" -I"C:\Qt51\5.1.0\mingw48_32\include\QtCore" -I"C:\Qt51\5.1.0\mingw48_32\include\QtCore\5.1.0 " -I"C:\Qt51\5.1.0\mingw48_32\include\QtCore\5.1.0\QtCore" -I".moc\release_shared" -I"..\..\..\..\mkspecs\win32-g++" -o .obj\release_shared\main.o main.cppIn file included from main.cpp:44:0:../../../sql/drivers/mysql/qsql_mysql_p.h:63:19: fatal error: mysql.h: No such file or directory#include <mysql.h>^compilation terminated.
Makefile.Release:497: recipe for target '.obj/release_shared/main.o' failedmingw32-make[1]: *** [.obj/release_shared/main.o] Error 1mingw32-make[1]: Leaving directory 'C:/Qt51/5.1.0/Src/qtbase/src/plugins/sqldrivers/mysql'makefile:38: recipe for target 'release-all' failedmingw32-make: *** [release-all] Error 2C:\Qt51\5.1.0\Src\qtbase\src\plugins\sqldrivers\my sql>

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)}

Options: ReplyQuote


Subject
Written By
Posted
error with mysql.h file missing(mysql driver for QT5)
September 01, 2013 01:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.