Updated by Alexander Shishkov almost 13 years ago

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

<pre><code class="cpp">
#define True 1
#define False 0
</code></pre>



OpenCV-2.3.1/modules/flann/include/opencv2/flann/dist.h has (inside namespace cvflann):
<pre><code class="cpp">
class True
{
};

class False
{
};
</code></pre>


The Xlib.h #defines make compilation fail.
A simple workaround is:
<pre><code class="cpp">


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


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

Back