0

Can someone guide me through on how to install gtest in windows, I have MingW.

This is what I saw in the gtest instruction

When building GoogleTest as a standalone project, the typical workflow starts with

git clone https://github.com/google/googletest.git -b release-1.10.0
cd googletest        # Main directory of the cloned repository.
mkdir build          # Create a directory to hold the build output.
cd build
cmake ..             # Generate native build scripts for GoogleTest.

once I run cmake I get

CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:10 (project):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


-- Detecting CXX compiler ABI info
CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_d9cf2fast &&
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/MinGW/bin
CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_95dd1fast &&
-- Check for working CXX compiler: C:/MinGW/bin - broken
CMake Error at C:/cmake-3.20.2-windows-x86_64/cmake-3.20.2-windows-x86_64/share/cmake-3.20/Modules/CMakeTestCXXCompiler.cmake:59 (message):
  The C++ compiler

    "C:/MinGW/bin"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/admin/Downloads/googletest-release-1.10.0/googletest-release-1.10.0/CMakeFiles/CMakeTmp

    Run Build Command(s):nmake -f Makefile /nologo cmTC_95dd1fast && The system cannot find the file specified
    Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_95dd1fast &&
Anonymous Asked question May 14, 2021