错误:vc\include\xdebug(32) : error C2365: 'operator new' : redefinition; previous definition was 'function'
由于
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#include <opencv.hpp>
请把#include 放在_DEBUG之前
正确的应该是
#include <opencv.hpp>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif