我正在尝试通过命令行通过 MinGW 编译 Google 测试,但是当我尝试使用命令进行编译时
gcc -I D:\gtest -I D:\gtest\include -I D:\gtest\include\gtest src\gtest_main.cc src\gtest-all.cc
Run Code Online (Sandbox Code Playgroud)
它抛出错误
Gtest.cc:812: error: 'gettimeofday' was not declared in this scope
我通过 Visual Studio 成功编译,所以我猜这不是代码的错误。有没有其他人遇到过这个问题并知道解决方案?