第一步:
第二步:
第三步:
然后就这样了:
报错内容如下:
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)
----------------分割线-----------------