Installing the Google C++ Testing Framework (gtest)

Installing gtest manually

Step 1: Download the latest (major) version from, for example:


Step 2: Unpack the archive, change to the corresponding directory and build the code from its source:

cd gtest-1.7.0

Check in the output of ./configure, whether the g++ compiler was found. If not, install it (e.g., with sudo apt-get install g++), and repeat the ./configure.

Step 3: Install the files, that is, copy them to the proper systems directories (you need to be root or have sudo rights for that):

sudo cp -a include/gtest /usr/local/include
sudo cp -a lib/.libs/* /usr/local/lib

Step 4: Check that the following files exist:


(optional) Step 5: If the library is (still) not found by the compiler, you can run:

sudo ldconfig

AD Teaching Wiki: ProgrammierenCplusplusSS2014/Gtest (last edited 2014-04-30 14:34:55 by Hannah Bast)