Results 1 to 10 of 10

Thread: Creating MySQL driver returns error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    165
    Thanked 2 Times in 2 Posts

    Default Re: Creating MySQL driver returns error

    Quote Originally Posted by d_stranz View Post
    If the compiler is telling you it can't find mysql.h, it either means that you don't have developer API for MySQL installed (maybe you only have the actual run-time DBMS code), or you don't have the include path correctly specified in your makefile or .pro file.
    Actually first I though that this was the problem: I didn't have the developer API, so today, thinking that that would fix the problem, I downloaded and installed this developer API.

    developer api.png

    But the same problem as before appeared, as if nothign had changed.

    Quote Originally Posted by d_stranz View Post
    Did you follow the instructions at the link you provided *exactly*?
    Yep. The only difference is that MySQL is installed in the F: and not in C: as in the instructions.

    Quote Originally Posted by d_stranz View Post
    It is irrelevant where your versions of Qt and MySQL are installed as long as you include the drive letter when you set up either the mysql environment variable or specify the include path.

    Of course, it is entirely possible that you installed 64-bit MySQL by mistake, but that has nothing to do with the problem you are having. I think the comment on that web site probably means the author has a 32-bit Qt installation. You cannot mix 32-bit and 64-bit EXE and DLL Windows modules, even on a 64-bit machine.
    Well, actually I think that my Qt is 32-bit version and MySQL is 64-bit :x

    qt version.jpg

    I'll give a look a the .pro file, since I found the mysql.h in the MySQL directory; maybe that's the problem.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,348
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: Creating MySQL driver returns error

    I am not sure about the comment regarding 64-bit MySQL. If you build your Qt MySQL plugin as 32-bit code, unless using that plugin requires you to load a 64-bit DLL from the MySQL distribution, then it should be OK. But I do not know how MySQL implements run-time access to the database server. If it is some kind of socket-based connection, then a 64-bit MySQL and a 32-bit Qt plugin shouldn't be a problem But if the connection is based on an interface through a 64-bit MySQL DLL, then it won't work.

    If you build a 64-bit version of Qt, then you'll should be OK using a 64-bit MySQL. You just need to be sure that you have apples and apples everywhere, and not apples and oranges.

Similar Threads

  1. Replies: 1
    Last Post: 3rd March 2011, 12:41
  2. source code for odbc driver or MySql driver in arm-embedded-linux
    By sattu in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th January 2011, 11:11
  3. [QT 4.6] Error build driver mysql
    By vinny gracindo in forum Installation and Deployment
    Replies: 1
    Last Post: 26th February 2010, 02:02
  4. Error Loading MySql Driver in 4.3.4
    By perrigo in forum Qt Programming
    Replies: 5
    Last Post: 26th March 2008, 15:38
  5. mysql driver and nmake error
    By Ghost in forum Installation and Deployment
    Replies: 13
    Last Post: 13th March 2008, 15:23

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
  •  
Qt is a trademark of The Qt Company.