I want to use gtest but execution tells me
./netTest: error while loading shared libraries: libgtest.so.0:
cannot open shared object file: No such file or directory
- What are standard paths in that gcc linker looks for libs
- What is standard path of Debian to store libs
- How do I add libpaths to g++ (-L flag correct?)
Note on 2: I ask because the libs of gtest are in /usr/local/libs/ but in there is just python and gtest. All other libs are in /usr/lib/. Hence i guess the gtest installer made something wrong.
PS. Perhaps you could just instal the Debian
libgtest-devpackage (if there’s one).You can see it with
gcc -v -x c /dev/null -o /dev/null 2>&1 | grep LIBRARY_PATHPerhaps you meant where the dynamic loader will look for shared libraries.
Check
/etc/ld.so.confand/or files in/etc/ld.so.conf.d/.You can use the
--rpathoption told. However, I would suggest using it only during development and not in deployment.You can also set
LD_LIBRARY_PATHto the location of yourlibgtest.so.0.