Monday, April 29, 2024
72
rated 0 times [  72] [ 0]  / answers: 1 / hits: 32835  / 3 Years ago, fri, october 22, 2021, 11:29:15

The libgtest-dev package seems only install header files to the system, but not the static and dynamic libraries which should be installed under /usr/lib.



Is it a bug?


More From » application-development

 Answers
2

Is it a bug?



No, it's deliberate:



gtest (1.6.0-1ubuntu2) precise; urgency=low

* Stop distributing static library (although still build it, to ensure gtest
works). Upstream recommends against shipping the libary at all, just the
source. (See: http://code.google.com/p/googletest/wiki/FAQ)
The Debian maintainer plans to do this also (see BTS: 639795); do it in
Ubuntu now to fulfil MIR requirements.

To build static libraries



cd /usr/src/gtest
sudo cmake .
sudo make
sudo mv libg* /usr/lib/



Edit:


The names have changed slightly over the years, though the process remains the same. In Ubuntu 17.04:


sudo apt-get install libgtest-dev
cd /usr/src/googletest/googletest
sudo mkdir build
cd build
sudo cmake ..
sudo make
sudo cp libgtest* /usr/lib/
cd ..
sudo rm -rf build

[#37904] Saturday, October 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hirtieve

Total Points: 207
Total Questions: 104
Total Answers: 114

Location: Cook Islands
Member since Thu, May 21, 2020
4 Years ago
;