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?
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?
No, it's deliberate:
To build static libraries
Edit:
The names have changed slightly over the years, though the process remains the same. In Ubuntu 17.04:
Improving on izx's answer I would have used cmake this way:
and I would attempt an out-of-source build:
Note that the recommended way by google is to have your existing project pull the gtest source code in.
Alternatively, when using with CMake, you can use
add_subdirectory
to add the gtest source that came withlibgtest-dev
since it by default goes into/usr/src/googletest
.The following will work