Add in the system Path:
C:opencvuildx86vc10in;
Project->Project Property->Configuration Properties->VC++Directories ->Include Directories:
C:opencvuildincludeopencv
C:opencvuildincludeopencv2
C:opencvuildinclude
Project->Project Property->Configuration Properties->VC++Directories ->Library Directories:
C:opencvuildx86vc10lib
C:opencvuildx86vc10staticlib
Project->Project Property->Configuration Properties->Linker->Input:
opencv_ts300d.lib
opencv_world300d.lib
opencv_ts300.lib
opencv_world300.lib