View Full Version : C++ and MySQL
Nikolai459
08-29-2005, 10:58 PM
Hello,
I've recently downloaded MySQL Server 4.1 and have already created a table within it. I would like to use a C program to read this database. Does anyone know of a simple C program (or a website that has one) that could read a database and display it? I'm just doing this for a test and want to see exactly how it's done and what it look like. Thanks in advance.
this might help you (http://www.cpp-home.com/tutorial.php?22_1)
Nikolai459
08-30-2005, 02:25 PM
Thanks eak! That's exactly what I was looking for!
Nikolai459
08-30-2005, 05:43 PM
Alright i've got it so it can compile but when I try to make an executable it gives me link errors:
Linking...
MySQL.obj : error LNK2001: unresolved external symbol _mysql_close@4
MySQL.obj : error LNK2001: unresolved external symbol _mysql_num_fields@4
MySQL.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4
MySQL.obj : error LNK2001: unresolved external symbol _mysql_store_result@4
MySQL.obj : error LNK2001: unresolved external symbol _mysql_query@8
MySQL.obj : error LNK2001: unresolved external symbol _mysql_real_connect@32
MySQL.obj : error LNK2001: unresolved external symbol _mysql_init@4
Debug/MySQL.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.
MySQL.exe - 8 error(s), 0 warning(s)
Anybody know how to get rid of these. I've put mysql++.lib and libmysql.lib into my library folder. Still getting these though.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.