cmake错误-找不到opencv库或标头 [英] cmake error - cannot find opencv libraries or headers
问题描述
我已经设置了opencv环境变量并更新了路径,但是当我尝试在Windows上使用cmake gui制作opencv aruco库时,仍然出现错误-错误提示
I've set the opencv environment variable and updated the path but I'm still getting an error when I try to make the opencv aruco library with cmake gui on windows - the error says
需要OpenCV,但找不到某些头文件或库.请使用OpenCV_DIR环境变量指定OpenCV目录"
"OpenCV required but some headers or libs not found. Please specify OpenCV directory using OpenCV_DIR env. variable"
我已经查看了错误来自哪里的FindOpenCV.cmake文件,但是我无法确定是什么部分导致了错误,并且想知道其他任何人是否也遇到过类似的问题或知道如何解决它非常感谢!
I've looked at the FindOpenCV.cmake file where the error is coming from, but I can't tell what part is causing an error and was wondering if anyone else has had similar problems or knows how to fix it it would be much appreciated!
推荐答案
@DeirdreMeehan您是否收到错误,如下图所示?
@DeirdreMeehan are you getting error as shown in the following image?
如果这是相同的错误,则应将openCV目录从计算机链接到ArUco.也就是说,您将OpenCV路径添加到名称字段为"OpenCV_DIR"的值字段中.
If this is the same error you are getting then you are supposed to link openCV directory from your computer to ArUco. That is you add OpenCV path in to value field where the name field is "OpenCV_DIR".
这篇关于cmake错误-找不到opencv库或标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!