Results 1 to 5 of 5

Thread: Build mysql driver for Qt5..5.1 for windows gives error:mysql.h: no such file or dir

  1. #1
    Join Date
    Aug 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5

    Default Build mysql driver for Qt5..5.1 for windows gives error:mysql.h: no such file or dir

    Dear all,
    i got this mistake when compiling driver by seppemagiels instructions on windows.

    what is my mistake?
    this is my Qt and mysql dir:

    C:\Qt5\5.5\Src\qtbase\src\plugins\sqldrivers\mysql
    C:\MySQL\MySQLServer5.5
    both are 32 bit installations on 64bit machine

    I have no spaces in dir name
    I ran prompt as administrator...


    Setting up environment for Qt usage...

    C:\Qt5\5.5\mingw492_32>set mysql=C:\\PROGRA~2\\MySQL\\MYSQLS~1.5

    C:\Qt5\5.5\mingw492_32>cd C:\Qt5\5.5\Src\qtbase\src\plugins\sqldrivers\mysql

    C:\Qt5\5.5\Src\qtbase\src\plugins\sqldrivers\mysql >qmake "INCLUDEPATH+=%mysql%\\include" "LIBS+=%mysql%\\lib\\libmysql.lib" -o Makefile mysql.pro

    C:\Qt5\5.5\Src\qtbase\src\plugins\sqldrivers\mysql >mingw32-make
    mingw32-make -f Makefile.Release all
    mingw32-make[1]: Entering directory 'C:/Qt5/5.5/Src/qtbase/src/plugins/sqldrivers/mysql'
    g++ -c -pipe -fno-keep-inline-dllexport -Is:/include -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. -IC:/Utils/icu32_54_1_mingw492/include -IC:/openssl/include -IC
    :/utils/postgresql/pgsql/include -IC:\PROGRA~2\MySQL\MYSQLS~1.5\include -IC:\Qt5\5.5\mingw492_32\include\QtCore\5.5.1 -IC:\Qt5\5.5\mingw492_32\include\QtCore\5.5.1\QtCor e -IC:\Qt5\5.5\mingw492_32\include\QtSql\5.5.1 -IC:\Qt5\5.5\mingw492_32\include\QtSql\5.5.1\QtSql -IC:\Qt5\5.5\mingw492_32\include
    -IC:\Qt5\5.5\mingw492_32\include\QtSql -IC:\Qt5\5.5\mingw492_32\include\QtCore -I.moc\release -I..\..\..\..\mkspecs\win32-g++ -o .obj\release\main.o main.cpp
    In file included from main.cpp:36:0:
    ../../../sql/drivers/mysql/qsql_mysql_p.h:55:19: fatal error: mysql.h: No such file or directory
    #include <mysql.h>
    ^
    compilation terminated.
    Makefile.Release:476: recipe for target '.obj/release/main.o' failed
    mingw32-make[1]: *** [.obj/release/main.o] Error 1
    mingw32-make[1]: Leaving directory 'C:/Qt5/5.5/Src/qtbase/src/plugins/sqldrivers/mysql'
    makefile:38: recipe for target 'release-all' failed
    mingw32-make: *** [release-all] Error 2

    C:\Qt5\5.5\Src\qtbase\src\plugins\sqldrivers\mysql >
    Attached Images Attached Images
    Last edited by GoranSimunic; 8th March 2016 at 12:39.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,418
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Build mysql driver for Qt5..5.1 for windows gives error:mysql.h: no such file or

    Quote Originally Posted by GoranSimunic View Post
    ../../../sql/drivers/mysql/qsql_mysql_p.h:55:19: fatal error: mysql.h: No such file or directory
    Just to be sure: you'vew verified that mysql.h is in one of the directories you've specified as include paths?

    Cheers,
    _

  3. #3
    Join Date
    Aug 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5

    Default Re: Build mysql driver for Qt5..5.1 for windows gives error:mysql.h: no such file or

    Im sorry that I do not understand your question well.
    I dont see that I have include mysql.h somewhere

    all I typed in command in prompt is:
    set mysql=C:\\PROGRA~2\\MySQL\\MYSQLS~1.5
    qmake "INCLUDEPATH+=C:/MySQL/include" "LIBS+=C:\MySQL\MySQLServer5.5\lib\libmysql.li b" mysql.pro
    mingw32-make

    I probably do not understand how did i include mysql.h?


    Added after 50 minutes:


    Dear all,
    sorry for me being superficial...
    I put wrong path to include as you mentioned. This one now is ok.

    qmake "INCLUDEPATH+=C:/MySQL/MySQLServer5.5/include" "LIBS+=C:/MySQL/MySQLServer5.5/lib/libmysql.lib" mysql.pro

    SOLVED so far...now i need to copy dll's to C:\Qt5\Tools\QtCreator\bin\plugins\sqldrivers
    there is no qsqlmysqld.dll in my system, just this one qsqlmysql.dll
    Last edited by GoranSimunic; 8th March 2016 at 14:27.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,418
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Build mysql driver for Qt5..5.1 for windows gives error:mysql.h: no such file or

    Quote Originally Posted by GoranSimunic View Post
    Im sorry that I do not understand your question well.
    I dont see that I have include mysql.h somewhere
    I did not ask where you include the header, I asked whether it is in one of the include paths you've specified.
    Shouldn't be too hard to point Explorer to those folders and check the list.

    Quote Originally Posted by GoranSimunic View Post
    I probably do not understand how did i include mysql.h?
    When the compiler reports an error, it is usually a good idea to look at the error message.

    Cheers,
    _

  5. #5
    Join Date
    Aug 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5

    Default Re: Build mysql driver for Qt5..5.1 for windows gives error:mysql.h: no such file or

    After building mysql driver is sucesuully done, I understand what you are asking.

    So the answer is:
    yes, I have included the wrong path :-)

    thank you for helping me find mistake.

    driver is built and it is working.

Similar Threads

  1. (Another) Can't build MySql driver on Mac OSX
    By Gretsch in forum Installation and Deployment
    Replies: 1
    Last Post: 2nd February 2015, 22:44
  2. Build mysql driver for Andorid arm V5
    By Abel in forum Installation and Deployment
    Replies: 0
    Last Post: 29th May 2014, 08:41
  3. Mysql Driver build Issue
    By davethomaspilot in forum Installation and Deployment
    Replies: 1
    Last Post: 4th January 2014, 19:02
  4. [QT 4.6] Error build driver mysql
    By vinny gracindo in forum Installation and Deployment
    Replies: 1
    Last Post: 26th February 2010, 02:02
  5. Build MySql driver in Windows Vista
    By Raccoon29 in forum Qt Programming
    Replies: 6
    Last Post: 11th January 2010, 14:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.