When I was trying to build the Google test c++ project I caught the errors
Error C3861 't1': identifier not found
Error C2065 't1': undeclared identifier
Error C2039 'thread': is not a member of 'std'
Error C2065 'thread': undeclared identifier
Error C2146 syntax error: missing ';' before identifier 't1'
My test code is:
#include <future>
#include <thread>
#include "pch.h"
TEST(...)
{
// preconditions here
std::thread t1([&] {
Sleep(100);
testee.enqueue(item);
});
t1.join();
// other logic
}
Why I cannot use the std::thread and other C++11 features in my project? How can I do it?