Skip to content

Instantly share code, notes, and snippets.

@Cartexius
Last active November 7, 2024 00:57
Show Gist options
  • Save Cartexius/4c437c084d6e388288201aadf9c8cdd5 to your computer and use it in GitHub Desktop.
Save Cartexius/4c437c084d6e388288201aadf9c8cdd5 to your computer and use it in GitHub Desktop.
Install gtest in Ubuntu

Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/

sudo apt-get install libgtest-dev

sudo apt-get install cmake # install cmake

cd /usr/src/gtest

sudo cmake CMakeLists.txt

sudo make

sudo cp *.a /usr/lib

sudo ln -s /usr/lib/libgtest.a /usr/local/lib/gtest/libgtest.a

sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/gtest/libgtest_main.a

@kumailxp
Copy link

Thanks! Works like awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment