![]() |
Connecting mySQL with C/C++
hey budies i need a bit of help.
Can neone guide me through the process of connecting mySQL database with C/C++, interms of API's or nething relevant... Would be thankful |
Re: Connecting mySQL with C/C++
Firstly you will need a couple of header files for the C program which needs to connect to a MySQL server.You'll mysql.h, which is a header file containing many standard MySQL definitions.This comes with MySQL, in case you don't have it download it from the MySQL website.
I complied the following code on a Linux machine using the cc compiler. Locate the mysql.h file using the whereis command and put the the full path in the include directive.You'll also need to specify the location of mysqlclient during compile time, like this - Code:
cc -o mysql_c_prg mysql.c -L/usr/include/mysql -L/usr/lib/mysql -lmysqlclientCode: C
|
Re: Connecting mySQL with C/C++
actually am using windows platform and i need to connect mySQL db with C/C++, thanks for this much efford but still if you can help me.. i would defenitely appreciate your efforts.. thanxs and bestr regards..
|
Re: Connecting mySQL with C/C++
Try out this link http://dev.mysql.com/doc/refman/5.0/...compiling.html
|
| All times are GMT +5.5. The time now is 23:47. |