cz201
cz201

Reputation: 1

Gtest file not found by g++

I run a code which needs gtest, but terminal shows:

'gtest/gtest.h' file not found

Here is the command:

$ g++ -w -I ../gtest/include/gtest -I../snap-core -I../glib-core -c run-all-tests.cpp

I think I add the path of gtest, but system did not find it.

Upvotes: 0

Views: 1191

Answers (1)

meto
meto

Reputation: 3719

You need to change

-I ../gtest/include/gtest

to

-I ../gtest/include/

because you are looking for the tile gtest/gtest.h, not gtest/gtest/gtest.h

Upvotes: 3

Related Questions