当前位置:   article > 正文

VSCODE中opencv2\core\utility.hpp typedef std::recursive_mutex Mutex;报错问题及#include <opencv2/core/core._opencv mutex报错

opencv mutex报错

VSCODE中opencv2\core\utility.hpp typedef std::recursive_mutex Mutex;报错问题及#include <opencv2/core/core.hpp>报错问题

一、opencv2\core\utility.hpp typedef std::recursive_mutex Mutex;报错问题,提示’Mutex’ is not a member of ‘cv’ typedef std::lock_guardcv::Mutex AutoLock。

##解决方法:更换MingGW版本至x86_64-13.2.0-release-posix-seh-msvcrt-rt_v11-rev1.7z。
链接于:https://github.com/niXman/mingw-builds-binaries/releases
在这里插入图片描述
2、下载后并替换原有mingw路径。保证环境变量可用。

二、#include <opencv2/core/core.hpp>报错问题。

报错识别不到opencv2/core/core.hpp这个文件。
解决方法:
更新 c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "D:\\\\ALL_PROJECT\\\\DEMOs\\\\camera_cv\\\\cvcplus\\\\OpenCV-MinGW-Build\\\\include",  //修改这里
                "D:\\\\ALL_PROJECT\\\\DEMOs\\\\camera_cv\\\\cvcplus\\\\OpenCV-MinGW-Build\\\\include\\\\opencv2"  //修改这里
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.17763.0",
            "compilerPath": "D:/ALL_PROJECT/DEMOs/CCpp/mingw64/bin/g++.exe",  //修改
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-gcc-x64"
        },
        {
            "name": "winopencv",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.17763.0",
            "compilerPath": "cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39

对于下载不下来的同学可以关注公众号回复“opencv”领取mingw下载包。

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/924015
推荐阅读
相关标签
  

闽ICP备14008679号