At first I was working on Linux environment and had gmock_main.a and gtest_main.a generated over there. Same files I was using in Windows environment in Eclipse, so it was giving error.
To get rid of the error I compiled the gmock and gtest code in cygwin terminal to generate gmock_main.a and gtest_main.a, and its working fine.