毕业设计笔记之OpenCV各种环境搭建by捉不住的鼬鼠

发布时间 : 星期日 文章毕业设计笔记之OpenCV各种环境搭建by捉不住的鼬鼠更新完毕开始阅读

选择编译器:

出现错误:

CMake Error: CMake was unable to find a build program corresponding to \CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

CMake Error: CMake was unable to find a build program corresponding to \CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is:

CMAKE_CXX_COMPILER_ENV_VAR CMake Error: Could not find cmake module file:

C:/soft/OpenCV2.4.8/build/x86/mingw/CMakeFiles/3.2.1/CMakeCXXCompiler.cmake

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is:

CMAKE_C_COMPILER_ENV_VAR CMake Error: Could not find cmake module file: C:/soft/OpenCV2.4.8/build/x86/mingw/CMakeFiles/3.2.1/CMakeCCompiler.cmake Configuring incomplete, errors occurred! 需要添加MinGW的环境变量到PATH: C:\\soft\\QT5.4.1\\Tools\\mingw491_32\\bin

退出后再次打开CMake,完成:

再次点击configure,红色消失:

然后点击Generate:

进入mingw目录:

输入mingw32-make:

这样可用于QT和mingw编译器的库文件就生成了。而对于Linux,只需要三句命令: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. make

sudo make install 太方便了,所以我比较喜欢在Linux环境下编程。 做完上面的步骤,还要添加环境变量: C:\\soft\\OpenCV2.4.8\\build\\x86\\mingw\\bin

联系合同范文客服:xxxxx#qq.com(#替换为@)