opencv自带objdetector.hpp报错

class CV_EXPORTS SimilarRects
{
public:
SimilarRects(double _eps) : eps(_eps) {}
inline bool operator()(const Rect& r1, const Rect& r2) const
{
double delta = eps*( std::min(r1.width, r2.width) + std::min(r1.height, r2.height))*0.5;
return std::abs(r1.x - r2.x) <= delta &&
std::abs(r1.y - r2.y) <= delta &&
std::abs(r1.x + r1.width - r2.x - r2.width) <= delta &&
std::abs(r1.y + r1.height - r2.y - r2.height) <= delta;
}
double eps;
};

  1. 对eps*( std::min(r1.width, r2.width) + std::min(r1.height, r2.height))*0.5;进行报错 error2059 2589 分别是::语法错误
  2. 修改后double delta = eps*( (std::min)(r1.width, r2.width) + (std::min)(r1.height, r2.height))*0.5; 又会报 LNK2001 无法解析的外部符号 "public: __cdecl cv::VideoCapture::VideoCapture(int)" (??0VideoCapture@cv@@QEAA@H@Z)这种错误 求大神们解答
不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^