I am trying to use opencv, but the macro defined as follows crashes.
What am I supposed to do?
/usr/include/opencv4/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/src/jetson_multimedia_api/include/EGL/eglplatform.h:136:0,
from /usr/src/jetson_multimedia_api/include/EGL/egl.h:39,
from /usr/src/jetson_multimedia_api/include/nvbuf_utils.h:33,
from TestJetsonNvjpgLib.cpp:13:
/usr/include/opencv4/opencv2/stitching.hpp:152:10: error: expected identifier before ‘int’
enum Status
Are you saying that if I copy the stitching.cpp file under /usr/share/opencv4/samples/cpp to my project directory and compile it, the macro crash problem will not occur?
Seems the second attempt with pkg-config opencv4 was ok, the error was that you were trying to build in a directory where you had no write priviledge. Retry from another directory (you may create one for this test under your home directory).