Thanks it worked.

Looks like Microsoft has not fixed it in VS 2008 also. I went to project properties > linker settings > advanced
and changed entry point from "main" to
"?mainCRTStartupStrArray@@$$FYMHP$01AP$AAVString@System@@@Z"

I appreciate your help very much. You have saved me a lot of time.