Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #include <gtest/gtest.h>
  2. TEST(MathTest, TwoPlusTwoEqualsFour) {
  3. EXPECT_EQ(2 + 2, 4);
  4. }
  5.  
  6. int main(int argc, char **argv) {
  7. ::testing::InitGoogleTest( &argc, argv );
  8. return RUN_ALL_TESTS();
  9. }
  10.  
  11. g++ -Wall -g -pthread test1.cpp -lgtest_main -lgtest -lpthread
  12.  
  13. /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_key_create'
  14. /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_getspecific'
  15. /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_key_delete'
  16. /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_setspecific'
  17. collect2: error: ld returned 1 exit status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement