I'm trying to build OpenCV project (cpp) with following inclusions:
include "opencv2/imgcodecs.hpp"
include "opencv2/highgui/highgui.hpp"
and getting an error during the make "redeclaration issues.
It happens because of imgcodecs.hpp contains declaration:
enum { IMREAD_UNCHANGED = -1, // 8bit, color or not IMREAD_GRAYSCALE = 0, // 8bit, gray IMREAD_COLOR = 1, // ?, color IMREAD_ANYDEPTH = 2, // any depth, ? IMREAD_ANYCOLOR = 4, // ?, any color IMREAD_LOAD_GDAL = 8 // Use gdal driver };
And highgui.hpp contains basically the same:
enum { // 8bit, color or not IMREAD_UNCHANGED =-1, // 8bit, gray IMREAD_GRAYSCALE =0, // ?, color IMREAD_COLOR =1, // any depth, ? IMREAD_ANYDEPTH =2, // ?, any color IMREAD_ANYCOLOR =4 };
Is any way to fix it without changing hpp files of OpenCV?
I'm really newbie at c++ thus my question could be dummy (sorry for that)