錯誤: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