googletest icon indicating copy to clipboard operation
googletest copied to clipboard

[Bug]: fatal error: gtest/gtest.h: No such file or directory

Open jonben3215 opened this issue 1 year ago • 3 comments
trafficstars

Describe the issue

I am using MSYS2 to run C++ and I tried every single thing. I looked up documentation for on MSYS2 to install gtest and all he toolchain and everything is present how ever VS and VSC both give the same error: fatal error: gtest/gtest.h: No such file or directory. Here is my code:

`// test.cpp #include <gtest/gtest.h>

// A simple test case TEST(SampleTest, AssertionTrue) { EXPECT_TRUE(true); } `

I at this point I have no clue what is happening I tried everything I could look up to resolve this issue.

Steps to reproduce the problem

This is hard to recreate. I am running this the first time. Can't really re-create the problem.

What version of GoogleTest are you using?

Name : mingw-w64-x86_64-gtest Version : 1.14.0-1

What operating system and version are you using?

Windows 11 version 23H2

What compiler and version are you using?

g++ (Rev3, Built by MSYS2 project) 13.2.0

What build system are you using?

cmake version 3.30.3

Additional context

No response

jonben3215 avatar Nov 20 '24 03:11 jonben3215