1. 添加opencv 头文件路径
Properties-> VC++ Directories -> Include Directories += $(OPENCV_INC)
2. runtime library 由dll改为非dll
Properties-> c/c++ / Code Generation -> Runtime Library = /MT (默认是/MD )
3. 添加opencv 库路径
Properties-> Linker->General->Additional Library Directories = $(OPENCV_STATIC_LIB)
4. 添加opencv 静态库名称
Properties-> Linker->Input-> 根据release还是debug输入库列表
####release
vfw32.lib
comctl32.lib
zlib.lib
libjasper.lib
libjpeg.lib
libpng.lib
libtiff.lib
IlmImf.lib
opencv_core249.lib
opencv_imgprc249.lib
opencv_highgui249.lib
####debug
vfw32.lib
comctl32.lib
zlibd.lib
libjasperd.lib
libjpegd.lib
libpngd.lib
libtiffd.lib
IlmImfd.lib
opencv_core249d.lib
opencv_imgprc249d.lib
opencv_highgui249的.lib
注意: 如果没有添加vfw32.lib 和 comctl32.lib 会报link2001错误。 具体跟window_win32.obj相关。