visual studio 2019运行opencv报错error: #error “This header with legacy C API declarations has been remov

完整报错:error: #error “This header with legacy C API declarations has been removed from OpenCV.

解决:

点击报错信息发现跳转到一个只有一行报错信息的文件,将改行报错信息删除,并保存该文件,再次编译源文件,即可成功

你可能感兴趣的:(计算机视觉,opencv)