Installing the Google C++ Testing Framework (gtest)
Installing from Ubuntu / Debian package
Step 1: Install the corresponding package (you need to be root or have sudo rights for this): If you don't find these files resort to the manual installation described in the following section.
This step might In that case, just copy the header and library files After that, check that the following files exist (just like for the installation from Ubuntu / Debian package above: sudo apt-get install libgtest-dev
Step 2: Verify that the installation worked by checking the existence of the following files: /usr/local/include/gtest/gtest.h
/usr/local/lib/libgtest.a
/usr/local/lib/libgtest.so
or
/usr/include/gtest/gtest.h
/usr/lib/libgtest.a
/usr/lib/libgtest.so
Installing gtest manually
Step 1: Download the latest version from http://code.google.com/p/googletest, for example: wget http://googletest.googlecode.com/files/gtest-1.6.0.zip
Step 2: Unpack the archive, change to the corresponding directory and build the code from its source: unzip gtest-1.6.0.zip
cd gtest-1.6.0
./configure
make
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 make install
'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system.
sudo cp -a include/gtest /usr/local/include
sudo cp -a lib/.libs/* /usr/local/lib
/usr/local/include/gtest/gtest.h
/usr/local/lib/libgtest.a
/usr/local/lib/libgtest.so