4.报错的路径和原因如下图8,大概意思就是在路径D:\opencv\sources\modules\photo\test的test_hdr.cpp缺少include文件 原因:缺少include文件 解决方法:打开test_hdr.cpp,添加 #include <ctime> #include <cstdlib> 1. 2. 成功啦~~