Cannot find -llibmysqld Collect2.exe: error: ld returned 1 exit status
-
You're trying to link libmysqld, the debug version of libmysql, but MySQL Connector C don't have that.
And from your output, it looks like you're not linking from MySQL Connector C, but MySQL Server 8.0.
What do you write for LIBS in the .pro file?
And what .libs are inC:\Program Files\MySQL\MySQL Server 8.0\lib
?
Also, why are you linking libmysql? If you are using the mysql plugin of Qt sql drivers, there's no need to do that. -
You're trying to link libmysqld, the debug version of libmysql, but MySQL Connector C don't have that.
And from your output, it looks like you're not linking from MySQL Connector C, but MySQL Server 8.0.
What do you write for LIBS in the .pro file?
And what .libs are inC:\Program Files\MySQL\MySQL Server 8.0\lib
?
Also, why are you linking libmysql? If you are using the mysql plugin of Qt sql drivers, there's no need to do that. -
@Bonnie So what can I do? install MySQL Server 8.0. and make PATH for it? i didn't link it with MySQL Server 8.0. How can i solve this?
-
@Malibob I'm not sure because I don't know what you've done. Can you post you .pro file?
And tell me do you have thisC:\Program Files\MySQL\MySQL Server 8.0\lib
folder in your system?
And if yes, what .libs are in it? -
@Bonnie Just I want to connect with MySQL database. There is no C:\Program Files\MySQL\MySQL Server 8.0\lib folder.
-
@Malibob Do you want to connect it by Qt Sql driver plugin, or you want to connect by your own using functions from "mysql.h"?
And I really need your .pro file to understand the situation, just theLIBS
-related part. -
@Bonnie I want to connect it by Qt SQL driver plugin. Sorry for the late reply. I Can make a message within 10 minutes
-
@Malibob Then you don't need to link libmysql at all.
Since you still not post your .pro file, I can only tell you to remove all the mysql-related contents fromLIBS
.