Professional Documents
Culture Documents
Steps To Install Gtest
Steps To Install Gtest
First of all open terminal and then execute following commands one by one
1.#!/bin/bash
2.sudo apt-get install libgtest-dev
3.sudo apt-get install cmake
4.cd /usr/src/gtest
5.sudo cmake CMakeLists.txt
6.sudo make
7.cd lib
8.sudo cp *.a /usr/lib
Now gtest is installed
Now to run test cases copy the folder Lab1 to Desktop on Ubuntu
After this change directory to the folder where tests.cpp exists (for this open
terminal and write following commands one by one)
cd ~/Desktop/Lab1
g++ tests.cpp -lgtest -lpthread -o filename
./filename