OpenCV在VC++2008 Express中的一个可恶错误!

昨天装OpenCV,首先下载了VC++ 2010 Express,结果出现错误,无奈看到有VC++ 2008的详细安装向导解释,于是又安装了2008,结果还是总出现下面的错误:

===================================================================

1>------ Build started: Project: opencvhello, Configuration: Debug Win32 ------

1>Compiling...

1>opencvhello.cpp

1>e:\opencv\mydemo\opencvhello\opencvhello\opencvhello.cpp(5) : fatal error C1083: Cannot open include file: 'highgui.h': No such file or directory

1>Build log was saved at "file://e:\openCV\myDemo\opencvhello\opencvhello\Debug\BuildLog.htm"

1>opencvhello - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

==========================================================================

折腾了好久还是不行,希望走过路过的XDJMS,能给指点迷津!

============================================================

2010-9-27 终于解决了,原来是在配置路径时,

在最后的配置时要求如下:


打开VC++ 2008 Express,菜单 Tools -> Options -> Projects and Solutions -> VC++ Directories

  • Show directories for选择include files,加入目录 D:\Program Files\OpenCV2.0\vc2008\include\opencv
  • Show directories for选择library files,加入目录 D:\Program Files\OpenCV2.0\vc2008\lib

可是在具体配置时,我没有按照要求,没有选择include files和library files,直接写在了executable files下面,所以才导致了上述错误。

具体配置可以参考:

http://www.opencv.org.cn/index.php/VC_2008_Express%E4%B8%8B%E5%AE%89%E8%A3%85OpenCV2.0/2.1

你可能感兴趣的:(PHP,UP,vc++)