Tx2 error

while compiling my code
[ 47%] Building CXX object examples/detectnet-camera/CMakeFiles/detectnet-camera.dir/detectnet-camera.cpp.o
In file included from /usr/local/include/opencv2/opencv.hpp:89:0,
from /home/nvidia/yj/jetson-inference/build/aarch64/include/jetson-utils/tracker.h:21,
from /home/nvidia/yj/jetson-inference/examples/detectnet-camera/kcftracker.hpp:85,
from /home/nvidia/yj/jetson-inference/examples/detectnet-camera/detectnet-camera.cpp:23:
/usr/local/include/opencv2/stitching.hpp:58:4: warning: #warning Detected X11 ‘Status’ macro definition, it can cause build conflicts. Please, include this header before any X11 headers. [-Wcpp]

warning Detected X11 ‘Status’ macro definition, it can cause build conflicts. Please, include this header before any X11 headers.

^~~~~~~

In file included from /usr/include/GL/glx.h:30:0,
from /home/nvidia/yj/jetson-inference/build/aarch64/include/jetson-utils/glUtility.h:28,
from /home/nvidia/yj/jetson-inference/build/aarch64/include/jetson-utils/glDisplay.h:27,
from /home/nvidia/yj/jetson-inference/examples/detectnet-camera/detectnet-camera.cpp:2:
/usr/local/include/opencv2/stitching.hpp:128:10: error: expected identifier before ‘int’
enum Status
^
In file included from /usr/local/include/opencv2/opencv.hpp:89:0,
from /home/nvidia/yj/jetson-inference/build/aarch64/include/jetson-utils/tracker.h:21,
from /home/nvidia/yj/jetson-inference/examples/detectnet-camera/kcftracker.hpp:85,
from /home/nvidia/yj/jetson-inference/examples/detectnet-camera/detectnet-camera.cpp:23:
/usr/local/include/opencv2/stitching.hpp:129:5: error: expected unqualified-id before ‘{’ token
{
^
examples/detectnet-camera/CMakeFiles/detectnet-camera.dir/build.make:62: recipe for target ‘examples/detectnet-camera/CMakeFiles/detectnet-camera.dir/detectnet-camera.cpp.o’ failed
make[2]: *** [examples/detectnet-camera/CMakeFiles/detectnet-camera.dir/detectnet-camera.cpp.o] Error 1
CMakeFiles/Makefile2:351: recipe for target ‘examples/detectnet-camera/CMakeFiles/detectnet-camera.dir/all’ failed
make[1]: *** [examples/detectnet-camera/CMakeFiles/detectnet-camera.dir/all] Error 2
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2

this error comes out
what’s the reason…?

Hi @imini, it seems like you added some code that includes openCV - can you try including it after glDisplay.h instead of before?

thanks a lot!!!
Thanks to you, I solved the problem.