Greetings,
So i tried to use the googletest library ( https://github.com/google/googletest ). First I compiled it with cmake:
marton@linux-clwa:~/documents/github/googletest/googletest/cmake> cmake ..
-- The CXX compiler identification is GNU 4.8.5
-- The C compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PythonInterp: /usr/local/bin/python (found version "3.4.5")
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marton/documents/github/googletest/googletest/cmak
e
marton@linux-clwa:~/documents/github/googletest/googletest/cmake> make
**Scanning dependencies of target gtest**
25%] Building CXX object CMakeFiles/gtest.dir/src/gtest-all.cc.o
50%] **Linking CXX static library libgtest.a**
50%] Built target gtest
**Scanning dependencies of target gtest_main**
75%] Building CXX object CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[100%] **Linking CXX static library libgtest_main.a**
[100%] Built target gtest_main
and I tried to use it in cpp file:
g++ 002.razd_razl.cpp -
I/home/marton/documents/github/googletest/googletest/include -L/home/marton/documents/github/
googletest/googletest/lib -lgtest -lpthread
Error:
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lgtes
t
installed some packages from preious threads :
gcc-32bit gcc48-32bit glibc-devel-32bit libasan0-32bit libatomic1-32bit libgomp1-32bit
libitm1-32bit
but nothing helped.
Any idea what is happening and how to fix it ?