我试图在Mac 10.10.3上使用Xcode 6.3构建opencv 2.4.10。并且由于构建而发生以下错误。

/Users/Shirui/work/program/opencv-2.4.10/modules/legacy/src/calibfilter.cpp:98:9:错误:数组比较
“this-> latestPoints”不等于空指针始终为真[-Werror,-Wtautologic-pointer-compare]
如果(latestPoints!= NULL)
^ ~~~~~~~~~~~~~~~
/Users/Shirui/work/program/opencv-2.4.10/modules/legacy/src/calibfilter.cpp:526:9:错误:数组地址
'this-> latestCounts'将始终评估为'true'[-Werror,-Wpointer-bool-conversion]
如果(最新计数)
~~ ^ ~~~~~~~~~~~
产生2个错误。

我使用的命令:

mkdir path-to-opencv-source/build
cd path-to-opencv-source/build
cmake -G "Unix Makefiles" ..
make -j8

非常感谢

最佳答案

这实际上是在使用 clang 构建OpencV时发生的问题。

首先是discussed herefixed here

当然,您可以自行修复,也可以下载最新版本的OpenCV。

关于opencv - 在Mac 10.10.3上构建opencv 2.4.10失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29724408/

10-11 22:44
查看更多