If you don't have a server you can use to test your setup, Download and install MySQL Server. I used XAMPP for this because I also needed Apache.
http://www.apachefriends.org/en/xampp.htmlDownload the "MySQL Connector" I used "Connector/C 6.0". At the time of this writing you need to create an account so that you can login and download files. I downloaded the mysql-connector-c-noinstall-6.0.2-win32.zip file without the installer.
http://dev.mysql.com/downloads/connector/c/6.0.htmlOnce unziped or installed make sure you know where the MySQL lib and include directories are.
Open your project options dialog. Under the compiler tab, enable Microsoft extensions. (also known as "setting the Ze flag")
Under the folders tab add the lib and includes folders for the MySQL Connector you just unzipped (or installed).
Under the linker tab add... libmysql.lib to the list of libs
Create a test program. Make sure you include at least the following...
#include <windows.h>
#include <winsock.h>
#include <mysql.h>
...and compile the project. I modified this program for my test.
http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.htmlCopy the libmysql.dll next to the newly created .exe (found in the libs directory of the MySQL Connector)
Run. (We hope)
Update:
I've tried this with the latest version of Pelles C and this Quick Start is still accurate.
--
Ronald Weidner
www.techport80.com