So since Saturday I am trying to setup MySQL Connector C++ with VS2012. I'll leave it without commentary that I had to download 1xx mb Boost libs just to run simple query from my program lol. Nevertheless it doesn't work.
The problem is that even when I setup everything correctly (following MySQL Connector Manual from official site) it just can't work - because the latest package that I downloaded does not contains files listed in manual. Manual states:
Add the lib/opt directory into the Additional Library Directories text field. This enables the library file libmysql.lib to be found.
But there is no libmysql.lib and/or libmysql.dll.
When building I receive obvious error: error LNK1181: cannot open input file 'libmysql.lib'
How can I setup this to work correctly?
edit: Maybe someone was setting up VS2012 to work with MySQL Connector C++ lately? Do I need to install MySQL Connector C before? (I've tried, doesn't work). Do I need to install MySQL Server on my comp before (I want to connect to external server anyway).
You need to install MySQL Server (with C/C++ API and libs), the MySQL client library (libmysql.lib) required by MySQL Connector/C++ is in the lib and/or lib/opt directory under the Server installation directory.
The link below will explain you step by step process
<
http://www.c-sharpcorner.com/UploadFile/47548d/install-mysql-connector-in-visual-studio-2012/
http://www.itcsolutions.eu/2010/09/09/how-to-connect-to-mysql-database-from-visual-studio-vs2010-problems-with-net-connectors/ >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With