First I copied your method without any modification but I failed. Then I found my directories are different from yours. I used Visual Studio 8.0 as the compiler and I built a debug and release version respectively. Then the .lib files should be in OPENCVDIR\VS2005\lib\debug,OPENCVDIR\VS2005\lib\release,OPENCVDIR\VS2005\bin\debug,OPENCVDIR\VS2005\bin\release respectively.
(Btw, the VS2005 directory is not there at first place, but was built when I used CMake to make the files, containing the built .sln and other files. You can name it differently, but the you should refer to compiled .libs.)
Also the .h files are in different places, possibly because I use a different version of OpenCV(I use 2.0). In this case it's in OPENCVDIR\include\opencv.
I still thank the author for making the principle right. All you have to pay attetion to is the concrete path names.