AD Teaching Wiki:

Installing the Google C++ Testing Framework (gtest)

Step 1: Change into the temporary directory, for example:

cd /tmp

Step 2: 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 (this requires cmake):

cd googletest-release-1.8.0/googletest
mkdir bld
cd bld
cmake ..

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):

 cp -a -r ../include/gtest /usr/local/include/.
cp -a *.a /usr/local/lib

(optional) Step 4: If the library is (still) not found by the compiler, you can run (as root or with sudo):


(optional) Step 5: Clean up:

cd /tmp
rm -rf googletest-release-1.8.0

AD Teaching Wiki: AlgoDatSS2017/Gtest (last edited 2017-06-13 08:27:39 by Axel Lehmann)