Google test Gtest.cc:812: error: "gettimeofday" was not declared in this area

I am trying to compile a google test via MinGW via the command line, but when I am trying to compile a command

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

he gives an error

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

I successfully compiled Visual Studio, so I think this is not a bug in the code. Has anyone else run into this problem and know a solution?

+4
source share
1 answer

<time.h> and <sys/time.h> - two different options:

+4
source

All Articles