s1k3s
s1k3s

Reputation: 71

How to add MySql library into Code::Blocks/MinGW

I need to create a C program that requires a MySQL database. For this, I've seen on the web that I need to use a MySQL connector (which I installed in my PC). I run my code with Code::Blocks/mingw and I don't know how to add the mysql libraries to it.

To connect to a MySQL database I need the mysql.h file (I have the file but I don't know where to place it in my computer). Can you guys help me?

Upvotes: 0

Views: 2325

Answers (1)

rakib_
rakib_

Reputation: 142715

If you're using mingw, then from mingw installer you should find the support for MySQL library. If it doesn't appear there, then you can download the MySQL-devel source tarball and then compile and install it with mingw (you need GCC and other software building tools installed). In this way you'll get support of mysqllib support in mingw like GNU/Linux environment.

Upvotes: 1

Related Questions