Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL connector c++ 1.1.3 does not contain libmysql.lib

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).

like image 554
kukis Avatar asked Aug 27 '13 15:08

kukis


2 Answers

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.

like image 62
zufuliu Avatar answered Nov 04 '22 09:11

zufuliu


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/ >

like image 28
Maverick Avatar answered Nov 04 '22 08:11

Maverick