Aug 15, 2015

GTest not working on Ubuntu even though it is installed?

So, I was wondering why I cannot use GTest even though I installed it from Ubuntu repositories.

The problem is described in this blog post and I am reposting the sollution (mostly as a note to myself):

Note that this package only install source files. You have to compile the code yourself to create the necessary library files. These source files should be located at /usr/src/gtest. Browse to this folder and use cmake to compile the library: 
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake .
sudo cp *.a /usr/lib