美文网首页
Ubuntu OpenCV2 CMake Error at Op

Ubuntu OpenCV2 CMake Error at Op

作者: 叫个鸡儿 | 来源:发表于2019-04-28 17:24 被阅读0次

    Ubuntu18.04编译安装OpenCV2.4.13,cmake时出错,错误如下:

    CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:85 (list):

    list GET given empty list

    Call Stack (most recent call first):

    CMakeLists.txt:109 (include)

    CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:86 (list):

    list GET given empty list

    Call Stack (most recent call first):

    CMakeLists.txt:109 (include)

    CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:89 (math):

    math cannot parse the expression: "*100 + ": syntax error, unexpected

      exp_TIMES, expecting exp_OPENPARENT or exp_NUMBER (1)

    Call Stack (most recent call first):

    CMakeLists.txt:109 (include)

    Detected version of GNU GCC: ()

    解决方式:打开opencv2.4.13/cmake/ OpenCVDetectCXXCompiler.cmake,修改第67行"-dumpversion""-dumpfullversion"

    原因是GCC版本太高了(>6),无法获取所有版本的编译器。

    参考:https://github.com/opencv/opencv/pull/9430/files

    相关文章

      网友评论

          本文标题:Ubuntu OpenCV2 CMake Error at Op

          本文链接:https://www.haomeiwen.com/subject/ftjjnqtx.html