/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp: In member function ‘void YOLOv4::EngineInference(const std::vector<std::__cxx11::basic_string >&, const int&, void, const std::vector&, cudaStream_t)’:
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:119:37: error: ‘std::chrono’ has not been declared
auto t_start_pre = std::chrono::high_resolution_clock::now();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:122:35: error: ‘std::chrono’ has not been declared
auto t_end_pre = std::chrono::high_resolution_clock::now();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:123:36: error: ‘std::chrono’ has not been declared
float total_pre = std::chrono::duration<float, std::milli>(t_end_pre - t_start_pre).count();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:123:53: error: expected primary-expression before ‘float’
float total_pre = std::chrono::duration<float, std::milli>(t_end_pre - t_start_pre).count();
^~~~~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:137:33: error: ‘std::chrono’ has not been declared
auto t_start = std::chrono::high_resolution_clock::now();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:139:31: error: ‘std::chrono’ has not been declared
auto t_end = std::chrono::high_resolution_clock::now();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:140:36: error: ‘std::chrono’ has not been declared
float total_inf = std::chrono::duration<float, std::milli>(t_end - t_start).count();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:140:53: error: expected primary-expression before ‘float’
float total_inf = std::chrono::duration<float, std::milli>(t_end - t_start).count();
^~~~~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:146:33: error: ‘std::chrono’ has not been declared
auto r_start = std::chrono::high_resolution_clock::now();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:151:31: error: ‘std::chrono’ has not been declared
auto r_end = std::chrono::high_resolution_clock::now();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:152:36: error: ‘std::chrono’ has not been declared
float total_res = std::chrono::duration<float, std::milli>(r_end - r_start).count();
^~
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:152:53: error: expected primary-expression before ‘float’
float total_res = std::chrono::duration<float, std::milli>(r_end - r_start).count();
^~~~~
CMakeFiles/Yolov4_trt.dir/build.make:86: recipe for target 'CMakeFiles/Yolov4_trt.dir/Yolov4.cpp.o' failed
make[2]: ** [CMakeFiles/Yolov4_trt.dir/Yolov4.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Yolov4_trt.dir/all' failed
make[1]: [CMakeFiles/Yolov4_trt.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
@futureflsl it may be caused by build environment, just comments these std::chrono lines, these were used to calculate inference time, comment these lines will not affect building engine and inference.
‘std::chrono’ has not been declared
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp: In member function ‘void YOLOv4::EngineInference(const std::vector<std::__cxx11::basic_string >&, const int&, void, const std::vector&, cudaStream_t)’:
/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:119:37: error: ‘std::chrono’ has not been declared
auto t_start_pre = std::chrono::high_resolution_clock::now();
^ [CMakeFiles/Yolov4_trt.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:122:35: error: ‘std::chrono’ has not been declared auto t_end_pre = std::chrono::high_resolution_clock::now(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:123:36: error: ‘std::chrono’ has not been declared float total_pre = std::chrono::duration<float, std::milli>(t_end_pre - t_start_pre).count(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:123:53: error: expected primary-expression before ‘float’ float total_pre = std::chrono::duration<float, std::milli>(t_end_pre - t_start_pre).count(); ^~~~~ /home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:137:33: error: ‘std::chrono’ has not been declared auto t_start = std::chrono::high_resolution_clock::now(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:139:31: error: ‘std::chrono’ has not been declared auto t_end = std::chrono::high_resolution_clock::now(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:140:36: error: ‘std::chrono’ has not been declared float total_inf = std::chrono::duration<float, std::milli>(t_end - t_start).count(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:140:53: error: expected primary-expression before ‘float’ float total_inf = std::chrono::duration<float, std::milli>(t_end - t_start).count(); ^~~~~ /home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:146:33: error: ‘std::chrono’ has not been declared auto r_start = std::chrono::high_resolution_clock::now(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:151:31: error: ‘std::chrono’ has not been declared auto r_end = std::chrono::high_resolution_clock::now(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:152:36: error: ‘std::chrono’ has not been declared float total_res = std::chrono::duration<float, std::milli>(r_end - r_start).count(); ^~/home/fut/ai/tensorrt_inference-master/Yolov4/Yolov4.cpp:152:53: error: expected primary-expression before ‘float’ float total_res = std::chrono::duration<float, std::milli>(r_end - r_start).count(); ^~~~~ CMakeFiles/Yolov4_trt.dir/build.make:86: recipe for target 'CMakeFiles/Yolov4_trt.dir/Yolov4.cpp.o' failed make[2]: ** [CMakeFiles/Yolov4_trt.dir/Yolov4.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Yolov4_trt.dir/all' failed make[1]: