AD Teaching Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

FrontPage

Links

  • Daphne

  • Forum

  • CodingStandards

  • Punktevergabe-Schema

  • Projektspezifikationen

Vergangene Semester

  • SS 2014

  • SS 2013 (nur ESE)

  • SS 2012

  • SS 2011

  • SS 2010

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

AD Teaching Wiki:
  • ProgrammierenCplusplusSS2016
  • Gtest

Installing the Google C++ Testing Framework (gtest)

Installing gtest manually from github (for older method see below)

Quick copy from the forum.

cd /tmp
wget https://github.com/google/googletest/archive/release-1.7.0.zip
unzip release-1.7.0.zip
cd googletest-release-1.7.0
mkdir bld
cd bld
cmake ..
make
cp -a ../include/gtest/gtest.h /usr/local/include/gtest.h
cp -a *.a /usr/local/lib
ldconfig
cd /tmp
rm -rf release-1.7.0.zip googletest-release-1.7.0

Installing gtest manually - deprecated but more detailed

Step 1: Download the latest (major) version from http://code.google.com/p/googletest, for example:

wget http://googletest.googlecode.com/files/gtest-1.7.0.zip

curl -o gtest-1.7.0.zip http://googletest.googlecode.com/files/gtest-1.7.0.zip

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

unzip gtest-1.7.0.zip
cd gtest-1.7.0
./configure
make

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:

/usr/local/include/gtest/gtest.h
/usr/local/lib/libgtest.a
/usr/local/lib/libgtest.so

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

sudo ldconfig
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01