Updated by Alexander Shishkov about 13 years ago

("my") <X11/Xlib.h> (fedora 16) contains

#define True 1
#define False 0

OpenCV-2.3.1/modules/flann/include/opencv2/flann/dist.h [[OpenCV]]-2.3.1/modules/flann/include/opencv2/flann/dist.h has (inside namespace cvflann):
class True
{
};

class False
{
};

The Xlib.h #defines make compilation fail.
A simple workaround is:

#include <X11/Xlib.h>
#undef True
#undef False
#include <cv.h>

But perhaps the #undefs could be added inside flann/dist.h ?

Back