Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <gtest/gtest.h>
- TEST(MathTest, TwoPlusTwoEqualsFour) {
- EXPECT_EQ(2 + 2, 4);
- }
- int main(int argc, char **argv) {
- ::testing::InitGoogleTest( &argc, argv );
- return RUN_ALL_TESTS();
- }
- g++ -Wall -g -pthread test1.cpp -lgtest_main -lgtest -lpthread
- /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_key_create'
- /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_getspecific'
- /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_key_delete'
- /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libgtest.so: undefined reference to `pthread_setspecific'
- collect2: error: ld returned 1 exit status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement