Just a good tip, if you want to stick to openCV in combination with windows and VS2010, then use the precompiled libraries. You will save yourself heaps of troubles.
Link: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#installation-by-using-the-pre-built-libraries
And please delete the previous question, its rude to post it twice, with no changes at all.