About /usr/include/opencv4/opencv2/stitching.hpp:152:10: error: expected identifier before ‘int’ enum Status

Hello,

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

Thank you.

hi neuezeal;
sorry for late response
could you compile sample code <stichcing.cpp> correctly from opencv4/samples/cpp?

1 Like

Hello,

I’ll try it on next monday.

Thank you.

Hello,


Where can I find stichcing.cpp?

Thank you.

Hello,

I am using sdcard image in another devkit,

I can’t find opencv installed by default.
I know that 3.3.1 is provided by default.
Am I wrong?

Thank you.

hi neuezeal:

sample path :/usr/share/opencv4/samples/cpp

1 Like

Hello,

I found stiching.cpp.
How do I compile stiching.cpp alone?

Thank you.

Hello,


Yes, as shown in the image below, the final command seems to work fine.
Did you tell me to compile like this?

Thank you.

hi neuezeal:
yes , if you can compile this stitching, try using this version in you project

Hello,

How to use?
Sorry. I am not familiar with opencv.

Thank you.

Hello,

Can I make the object file compiled stitching.cpp as a library and attach it?

Thank you.

Hello,

You told me to use this version
stitching.cpp under /usr/share/opencv4/samples/cpp
Are you saying move it to the /usr/local/include/opencv4 directory?

Thank you.