Win10 MinGW make error: googletest/CMakeFiles/gtest.dir/all] Error 2
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
I'm trying to build gtest and gmock (1.11.0) in win10 on MinGW.
tools:
gcc version 11.2.0
make GNU 4.3 (download from: http://www.equation.com/ftpdir/make/64/make.exe)
cmake 3.21.1
**Steps to reproduce the bug**
Here is process:
1:Generate MinGW Makefiles:
(base) PS D:\WorkSpace\Codes\GTest_GMock\googletest-master\build> ls
(base) PS D:\WorkSpace\Codes\GTest_GMock\googletest-master\build> cmake .. -G "MinGW Makefiles"
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/MinGW64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/MinGW64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: D:/ProgramData/Miniconda3/python.exe (found version "3.9.5") found components: Interpreter
-- Configuring done
-- Generating done
-- Build files have been written to: D:/WorkSpace/Codes/GTest_GMock/googletest-master/build
2: Build Target:
(base) PS D:\WorkSpace\Codes\GTest_GMock\googletest-master\build> mingw32-make.exe
[ 25%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj
系统找不到指定的路径。(system cannot find path.)
mingw32-make[2]: *** [googletest\CMakeFiles\gtest.dir\build.make:76: googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj] Error 1
mingw32-make[2]: *** Deleting file 'googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj'
mingw32-make[1]: *** [CMakeFiles\Makefile2:99: googletest/CMakeFiles/gtest.dir/all] Error 2
mingw32-make: *** [makefile:145: all] Error 2
(base) PS D:\WorkSpace\Codes\GTest_GMock\googletest-master\build>
error occur while build target; i'm trying to debug makefile but get nothings.
CMakeFiles\Makefile2:99 line as follow:
$(MAKE) $(MAKESILENT) -f googletest\CMakeFiles\gtest.dir\build.make googletest/CMakeFiles/gtest.dir/build
Contributor guide
Assessment
This issue has not been assessed yet.