Mingw GCC 编译OpenCV报错: Project files may be invalid

这是一个通用报错弹窗:

具体要看下边输出窗口:

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!

 大概就是说没有找到GCC的编译exe路径,可以点击Environment...配置路径:

 搜索Path:

 注意在Path追加路径时有一个;分号。

另外实在不行重启电脑试试,我就是重启电脑好的...,重启前怎么试都不好,想不明白和电脑重启哪里有关联。

 最好把路径也配置到系统变量中,因为后续编译还需要用到mingw\bin下的命令行工具

posted @ 2024-07-05 16:36  耿明岩  阅读(2)  评论(0编辑  收藏  举报
希望能帮助到你,顺利解决问题! ...G(^_−)☆