You need to link in the mysqlclient library. Select Project-> Settings from the VC menu bar, then select the Link Tab and add mysqlclient.lib to the Object/Library Field. You will need to do this for the Release and Debug version. You will also need to add the path under the Input Category of the Link Tab. For Release Code the library is generally found C:\mysql\lib\opt \ . Unless you want to debug the mysql library you can use this library for both Debug and Release versions.
I hope this helps... Pat... [EMAIL PROTECTED] ----- Original Message ----- From: "migu00001" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 14, 2002 7:07 PM Subject: LINK2001, I need help > I desperately need to find a solution to this problem: > > > Winnt 4,0, service pack 6.0; Visual C++;mysql-max-3.23.49-win binary. > > my.ini File: > [mysqld] > basedir=D:/mysql > datadir=D:/mysql/data > > 1.-On prompt: > D:\mysql\bin>mysqld-nt --install > the current server installed: ... > (sucessfull) > > D:\mysql\bin>NET START mysql > El servicio de mysql se ha iniciado con exito > (sucessfull) > > D:\mysql\bin>mysqlshow -u root mysql > Database: mysql ... > (sucessfull) > > D:\mysql\bin>mysql test > Welcome to teh mysqlserver .... > (sucessfull) > > 2.- My c file is: > > #include <winsock.h> > #if defined(_WIN32) || defined(_WIN64) > #include <windows.h> > #endif > #include <mysql\mysql.h> > > main (){ > MYSQL * db; > > db=mysql_init(0); > mysql_real_connect(db,"localhost", 0,0, "test", 0, 0, 0); > > mysql_close(db); > } > > 4.- The output: > > Compiling... > prueba.c > Linking... > prueba.obj : error LNK2001: unresolved external symbol _mysql_close@4 > prueba.obj : error LNK2001: unresolved external symbol > _mysql_real_connect@32 > prueba.obj : error LNK2001: unresolved external symbol _mysql_init@4 > Debug/mysql.exe : fatal error LNK1120: 3 unresolved externals > Error executing link.exe. > mysql.exe - 4 error(s), 0 warning(s) > > thanks. > migu > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php