I will explain...
I downloaded mysql-5.0.45-win-src.tar.gz from Mysql download area.I tried to built Mysql.sln inside that,but i am getting errors(about 58) like

Error 149 fatal error LNK1181: cannot open input file '..\zlib\release\zlib.lib' mysql_upgrade

Error 319 error PRJ0019: A tool returned an error code from "Performing Custom Build Step" mysqld

Error 92 error C3163: '_vsnprintf': attributes inconsistent with previous declaration C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h 358

Error 262 error LNK2005: ___sbh_alloc_new_group already defined in LIBCMT.lib(sbheap.obj) LIBCMTD.lib

Can you help me out?

I think it's a question for MySQL forums. As far as I know there are lots of info about MySQL building from sources.
The question (and the answer) has no relation to the C++ language per se.