OpenCV3.4 error: 'time' was not declared in this scope

  1. Compilation environment Windows
  2. Target Compilation Platform Windows
  3. Compile tool Mingw5.3
  4. Error file test_hdr.cpp
  5. Error line 140 6. The reason for the error and the time function is undefined
srand(static_cast<unsigned>(time(0)));

quote in the header

#include <sys/time.h>

Just

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325819237&siteId=291194637
Recommended