Results 1 to 10 of 10

Thread: MySQL driver installation on Qt 4.7.0

  1. #1
    Join Date
    Oct 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default MySQL driver installation on Qt 4.7.0

    Hey Qtcentre,

    I'm currently working on an application which need acces to a MySQL database. I get the usual error with the missing driver for MySQL when trying to run the app in the simulator, and it wont run on the phone (n900) either.

    I did the following:

    Download and install MySQL with libraries
    Run Qt. 4.7 Command prompt
    cd c:\Qt\4.7.0\src\plugins\sqldrivers\mysql
    qmake "INCLUDEPATH+=C:\\program files\\MySQL\\MySQL Server 5.1\\include" "LIBS+=C:\\program files\\MySQL\MySQL Server 5.1\\lib\\opt\\libmysql.lib" mysql.pro
    nmake

    Everything works until i write nmake, where i get the following error:
    'nmake' is not recognized as an internal or externa......
    I tried make and mingw32-make which gave the same error.

    I then saw a different approach, and tried to edit the path in environment variables under systems to c:\Qt\4.7.0\bin, but didn't understand the part about adding the destination to the compiler. (what compiler and where?)

    Im quite a neewb, so i'll appreciate anything easy to understand
    Last edited by FrankN; 30th November 2010 at 17:28.

  2. #2
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL driver installation on Qt 4.7.0

    'nmake' is not recognized as an internal or externa......
    I tried make and mingw32-make which gave the same error.
    First you need to figure out what your environment actually is. Are you using Visual Studio or MinGW? You saying this:
    I then tried to download nmake which didn't work on my 64 bit W7.
    makes me smile. Are you serious?

  3. #3
    Join Date
    Oct 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: MySQL driver installation on Qt 4.7.0

    Thank you for your reply!


    Quote Originally Posted by Timoteo View Post
    First you need to figure out what your environment actually is. Are you using Visual Studio or MinGW? You saying this:
    To be honest i don't know, i just started programming. A guide online told me to write mingw32-make if nmake wouldn't work.

    Quote Originally Posted by Timoteo View Post
    makes me smile. Are you serious?
    I'm glad i made you smile But yes, i was serious I also saw this in an online guide which i might have misunderstood!

  4. #4
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL driver installation on Qt 4.7.0

    Do you even have a development environment setup? From the path you show as being your Qt install, it would seem you have the libraries for Visual Studio 2008 installed.

  5. #5
    Join Date
    Oct 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: MySQL driver installation on Qt 4.7.0

    Hey, i now have a development environment (i think). It runs make, but now i get the following error:



    Thanks in advance

  6. #6
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL driver installation on Qt 4.7.0

    Did you actually use the MySQL Server installer? Are those files actually there? If not, run the installer and select a custom install. Choose the development files.

  7. #7
    Join Date
    Oct 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: MySQL driver installation on Qt 4.7.0

    Quote Originally Posted by Timoteo View Post
    Did you actually use the MySQL Server installer? Are those files actually there? If not, run the installer and select a custom install. Choose the development files.
    Yes, i did use the MySQL Server Installer, and selected the custom installer to choose the development files. The files seems to be there (i checked libmysql.lib). qsql_mysql.h is also in it's location.
    Is there any other files to look for?

    Thanks very much for your help!! It's much appreciated!

  8. #8
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MySQL driver installation on Qt 4.7.0

    Ahh, looking at your output again I see something else. \Program Files\ has a space in the path. I would relocate the headers and the lib to a directory without a space (i.e. C:\MySQL\).

  9. #9
    Join Date
    Oct 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: MySQL driver installation on Qt 4.7.0

    Quote Originally Posted by Timoteo View Post
    Ahh, looking at your output again I see something else. \Program Files\ has a space in the path. I would relocate the headers and the lib to a directory without a space (i.e. C:\MySQL\).

    Hey, i tried to install mysql in another directory without spaces. It seems like it was the solution to solve the error. Unfortunately, i got another error insted.

    I got his error:


    I read another guide telling me to first reimp libmysql.lib. I did this and instead used the liblibmysql.a but got this error:


  10. #10
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: MySQL driver installation on Qt 4.7.0

    anyone?

Similar Threads

  1. I need MySQL driver for Qt 4.6, WindowsXP(32), MySQL 5.1
    By User_3 in forum Installation and Deployment
    Replies: 7
    Last Post: 15th October 2010, 15:19
  2. QMYSQL database driver installation files
    By babygal in forum Newbie
    Replies: 28
    Last Post: 12th August 2010, 11:55
  3. Qt mysql driver installation problem
    By alphajoseph in forum Installation and Deployment
    Replies: 1
    Last Post: 8th February 2009, 11:56
  4. Mysql installation on Qt 4.4.1
    By eekhoorn12 in forum Installation and Deployment
    Replies: 6
    Last Post: 10th October 2008, 09:50
  5. driver installation
    By kernel_panic in forum Qt Programming
    Replies: 2
    Last Post: 6th September 2007, 10:20

Tags for this Thread

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.