Google test Gtest.cc:812: error: 'gettimeofday' was not declared in this scope

Viewed 6855

I am trying to compile Google test through MinGW via command line, but when I try to compile with command

gcc -I D:\gtest -I D:\gtest\include -I D:\gtest\include\gtest src\gtest_main.cc src\gtest-all.cc

it throws error

Gtest.cc:812: error: 'gettimeofday' was not declared in this scope

I successfully compiled through Visual Studio, so my guess it's not the fault in code. Does anyone else encountered this problem and knows solution?

1 Answers
Related