qt - cmake 上的 Windows 错误将 Opencv 与 Qt 链接
问题描述
我正在尝试通过使用 cmake 添加我的 opencv 并为 Qt 贡献模块,例如此视频https://www.youtube.com/watch?v=NwLkwfCt9mM&t=191s
但是我安装了Qt并像这样添加了系统变量的路径: C:/Users/Gökhan/Desktop/cmake-3.19.8-win64-x64/bin C:/Qt/Qt5.12.11/Tools/mingw730_64/bin C:/ Qt/Qt5.12.11/5.12.11/mingw73_64/bin
当我试图将 opencv 添加到 qt cmake 时说:
Error in configuration process, project files may be invaild.
这是写在下划线中的错误:
CMake Error at C:/Users/Gökhan/Desktop/cmake-3.19.8-win64-x64/share/cmake-3.19/Modules/CMakeTestCXXCompiler.cmake:59 (message):
The C++ compiler
"C:/Qt/Qt5.12.11/Tools/mingw730_64/bin/g++.exe"
无法编译简单的测试程序。
它失败并显示以下输出:
Change Dir: C:/New folder (4)/opencv-4.5.2/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Qt/Qt5.12.11/Tools/mingw730_64/bin/mingw32-make.exe cmTC_db0d5/fast && C:/Qt/Qt5.12.11/Tools/mingw730_64/bin/mingw32-make.exe -f CMakeFiles\cmTC_db0d5.dir\build.make CMakeFiles/cmTC_db0d5.dir/build
mingw32-make.exe[1]: Entering directory 'C:/New folder (4)/opencv-4.5.2/build/CMakeFiles/CMakeTmp'
process_begin: CreateProcess(NULL, C:\Users\Gökhan\Desktop\cmake-3.19.8-win64-x64\bin\cmake.exe -E cmake_echo_color --switch= "--progress-dir=C:\New folder (4)\opencv-4.5.2\build\CMakeFiles\CMakeTmp\CMakeFiles" --progress-num=1 "Building CXX object CMakeFiles/cmTC_db0d5.dir/testCXXCompiler.cxx.obj", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe[1]: *** [CMakeFiles\cmTC_db0d5.dir\build.make:83: CMakeFiles/cmTC_db0d5.dir/testCXXCompiler.cxx.obj] Error 2
mingw32-make.exe[1]: Leaving directory 'C:/New folder (4)/opencv-4.5.2/build/CMakeFiles/CMakeTmp'
mingw32-make.exe: *** [Makefile:139: cmTC_db0d5/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:107 (enable_language)
我已经检查了解决方案,但我使用 Windows 8 的方式无法实现任何目标
解决方案
推荐阅读
- java - Java中的复和函数
- angular - 离子/角度 - 多条路线不起作用
- java - 二进制搜索必须返回一个值,尽管返回一个值
- hyperledger-sawtooth - 无法从我的事务系列的 REST-API 接收数据
- javascript - 将元素传递给 node.js 终端
- testing - 来自测试架构的 ASP
- c# - Emgu CV Ram问题
- reactjs - 无法获取链接以显示新页面
- java - 致命异常:主进程:com.empowered.healo,PID:28143 io.reactivex.exceptions.CompositeException:发生2个异常。?
- python - 从字典中打印单个唯一行而不重复