I try to include gtest to my C++ project. The IDE I'm using is CLion. I have this in my CMAKE
include_directories(/usr/local/include)
include_directories(/usr/local/lib)
and this in the file that I'm working on
#include "gtest/gtest.h"
I have installed gtest in the Terminal using these commands:
git clone https://github.com/google/googletest
cd googletest
mkdir build
cd build
cmake ..
make
make install
I'm assume that's enough to use gtest, but the Compiler says otherwise. This is the error message that I receive
ld: library not found for -lgtest
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone have an idea how I can fix it? Any attempt is appreciated!
Solution: I follow the direction on the README.md file from googletest github page and it works like a charm. https://github.com/google/googletest/blob/master/googletest/README.md
make installinstalled it. - drescherjm/usr/local/lib/- drescherjm