沐本汐
2021-08-28 22:18
采纳率: 50%
浏览 54

用cmake配置qt的openxv环境在加载的那一步总是出错是怎么回事?请大家看看哪一步有问题,怎么解决

第一步:

img

第二步:

img

第三步:

img

img

img


然后就这样了:

img

报错内容如下:
CMake Error at D:/RJDZ/CMake6/cmake-3.21/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler

"D:/RJDZ/QT/Tools/mingw730_32/bin/g++.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: D:/RJDZ/Opencv-4.5.0/opencv/opencv-build/CMakeFiles/CMakeTmp

Run Build Command(s):D:/RJDZ/QT/Tools/mingw730_32/bin/mingw32-make.exe -f Makefile cmTC_b3d94/fast && D:/RJDZ/QT/Tools/mingw730_32/bin/mingw32-make.exe  -f CMakeFiles\cmTC_b3d94.dir\build.make CMakeFiles/cmTC_b3d94.dir^ild

mingw32-make.exe[1]: Entering directory 'D:/RJDZ/Opencv-4.5.0/opencv/opencv-build/CMakeFiles/CMakeTmp'

Building CXX object CMakeFiles/cmTC_b3d94.dir/testCXXCompiler.cxx.obj

D:\RJDZ\QT\Tools\mingw730_32\bin\g++.exe    -o CMakeFiles\cmTC_b3d94.dir\testCXXCompiler.cxx.obj -c D:\RJDZ\Opencv-4.5.0\opencv\opencv-build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx

Cannot create temporary file in C:\Users\??????\AppData\Local\Temp\: Invalid argument

mingw32-make.exe[1]: *** [CMakeFiles\cmTC_b3d94.dir\build.make:77: CMakeFiles/cmTC_b3d94.dir/testCXXCompiler.cxx.obj] Error 3

mingw32-make.exe[1]: Leaving directory 'D:/RJDZ/Opencv-4.5.0/opencv/opencv-build/CMakeFiles/CMakeTmp'

mingw32-make.exe: *** [Makefile:126: cmTC_b3d94/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:109 (enable_language)

----------------分割线-----------------

3条回答 默认 最新

相关推荐 更多相似问题