MySQL Connector/C++ Library Linking ERROR Problem

六月ゝ 毕业季﹏ 提交于 2019-12-06 13:28:58

You must first change your code:

driver = sql::mysql::get_mysql_driver_instance();

And next, you have to link your code with mysqlclient.lib Add the right path of your lib mysqlclient.lib on your project:

Properties->Linker->General-> Additionnal Libraries

Here add the path of your lib.

A quick google search suggests that your line should read:

driver = sql::mysql::get_mysql_driver_instance();

The error is a compiler error. It's complaining that it can't find get_mysql_driver_instance() in the specified namespace.

Try double clicking the line:

1>        c:\program files\mysql\mysql connector c++ 1.0.5\include\mysql_driver.h(25) : see declaration of 'sql::mysql::MySQL_Driver'

It will show you the header file, and you can search in there to make sure the function is present.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!