Can't build the MySQL drivers
-
@AlanT1337
Hello,
You either get an SDK for the mysql client library that includes the.lib
or you build it yourself. No matter what kind of connectors or other runtimes you download, they wouldn't include the import library (as MS calls it) because they're not a development package (which you need).Kind regards.
-
@kshegunov Thanks for the reply. As far as i know, the MySQL Server source and the MySQL C++ Connector conatin all the needed libraries. Also, there is no other official SDK for MySQL. That's why I'm so confused, because nobody has ever heard of an "mysql.lib" they all only have the "libmysql.lib" file included.
This takes me over 3 days now already... I need help really badly, since I got no clue what I have to do. I would really appreciate if somebody has 5-10 minutes to help me.
-
Hi and welcome to devnet,
Did you modify the plugin .pro file ?
-
That's why I'm so confused, because nobody has ever heard of an "mysql.lib" they all only have the "libmysql.lib" file included.
Well, this is it! In the end you have the
lib
file, the only problem seems to be still on the table is that the linker looks for the wrong one. To join @SGaist:Did you modify the plugin .pro file ?
Kind regards.
-
@SGaist
Hey, thanks for the response. Yes I did modify it, I followed a tutorial. Now I've downloaded it again and I did not modify it and tried to build it. It first gave me the error that it can't find the mysql.h file, so I've add the Includepath to it. Now I get the error "cannot find -libmysql", even if I add the correct library path. :(Hope somebody can help me! :)
EDIT: I copied the libmysql.lib into the compiler path. Now it builds succesfully but it does not create the needed dll files... Still need help :c
-
Did you add something like:
LIBS += -LC:/Path/To/MySQL/Folder/Where/.lib_file/Can/Be/Found
?
On a side note, if the path contains spaces, then you might get into trouble (Windows always gave trouble with paths containing spaces). If so either move your MySQL install (or just the header and lib file) in a path without space or use the 8.3 notation. (I recommend the first solution)
-
Where did you check their existence ?
-
@AlanT1337
Well, this sounds like a intermediate dir created by Qt creator, look up the plugins directory. When I build Qt I get the plugins' binaries inqtbase/plugins/
(although I do it from the command line). -
@kshegunov I dont have a "plugins" folder in my "qtbase" directory D:
Edit: I think it was build in my normal Qt folder in "C:\Qt\5.5\msvc2013\plugins\sqldrivers", if I pick the msv2013 32bit compiler now for the project I need the driver for, then it works!!! Thanks sooooooooo much to everyone who helped me!!!! :)
-
@AlanT1337 said:
I think it was build in my normal Qt folder
I suppose that's possible, if you're using the
qmake
from that location to run on the project file. In any case I'm glad it's working now.