Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
sudo apt-get install libgtest-dev
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib
sudo ln -s /usr/lib/libgtest.a /usr/local/lib/gtest/libgtest.a
sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/gtest/libgtest_main.a
@basil59, I agree with you, but looking at www.askubuntu.com stack exchange reference below shows that
libgtest-dev
is now stored in/usr/src/googletest/googletest
. So it might be a good idea to make symbolic links to googletest folder. Of course, I could be wrong, and this would be dependent on the package you are trying to use gtest for, and may require you to just use/usr/local/lib/gtest
.Reference to answer for 17.04 and 18.04 libgtest-dev: https://askubuntu.com/a/145913
Then do: