You need to specify -pthread
after -lgtest
. The linker takes libraries in order, and only takes as much as it needs to resolve references which are undefined at that point.
More Related Contents:
- How to set up Google C++ Testing Framework (gtest) with Visual Studio 2005
- Comparison of C++ unit test frameworks [closed]
- How to set up googleTest as a shared library on Linux
- CPack: Exclude INSTALL commands from subdirectory (googletest directory)
- CMake Error: “add_subdirectory not given a binary directory”
- How to run specific test cases in GoogleTest
- google mock – can I call EXPECT_CALL multiple times on same mock object?
- Comparison of arrays in google test?
- How to test an EXE with Google Test?
- GoogleTest: How to skip a test?
- positioning pie slice problems
- How to call C++ function from C?
- Why does stringstream >> change value of target on failure?
- Is null reference possible?
- Why does printf() promote a float to a double?
- how to check if given c++ string or char* contains only digits?
- C++ Static member method call on class instance
- Where do “pure virtual function call” crashes come from?
- Nonfree module is missing in OpenCV 3.0
- C++ Error: undefined reference to `main’
- How to filter items from a std::map? [duplicate]
- How to use doxygen to create UML class diagrams from C++ source
- What are the differences between overriding virtual functions and hiding non-virtual functions?
- Returning const reference to local variable from a function
- App does not run with VS 2008 SP1 DLLs, previous version works with RTM versions
- Behaviour of malloc with delete in C++
- Understanding Boost.spirit’s string parser
- How does =delete on destructor prevent stack allocation?
- Why does the free() function not return memory to the operating system?
- What is the order of evaluation in a member initializer list?