Connecting to MySQL from C -- Sample Code
9/16/2010 11:26:00 PM
Posted by johnhomer
I got curious how to connect to a MySQL server from C. This code is a rip-off from another blog but made minor modifications to get rid of compile warnings. My test system is Snow Leopard 10.6.3.
Compile by:
gcc -o test $(mysql_config --cflags) test.c $(mysql_config --libs)
Code
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
c,
programming
. Follow any responses to this post through RSS. You can leave a response, or trackback from your own site.
Subscribe to:
Post Comments (Atom)
Post a Comment