Ask Your Question
0

which gcc++ compiler is need to run opencv4 code?

asked 2019-03-02 00:59:51 -0500

I am installed opencv4 in linux while compiling it throws an fatal error: opencv2/core.hpp: No such file or directory compilation terminated.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2019-03-04 00:41:17 -0500

Yashas gravatar image

The opencv2 directory resides inside opencv4 directory. A quick workaround to get old code compiling would be to inform your compiler about the new opencv4 directory. For g++, add -I/path/to/your/include/opencv4 (mostly -I/usr/local/include/opencv4) as a compiler flag project wide and your code should compile.

edit flag offensive delete link more

Comments

COULD YOU PLS TELL ME HOW TO SET PATH OPENCV4

opencv.org gravatar imageopencv.org ( 2019-03-04 06:35:17 -0500 )edit

I think that's what the answer does. You need to state more clearly what part of the answer you did not understand.

Yashas gravatar imageYashas ( 2019-03-04 08:56:32 -0500 )edit
0

answered 2019-03-02 02:42:38 -0500

berak gravatar image

updated 2019-03-02 02:43:44 -0500

IF you successfully built and installed opencv4 before, it's probably not a problem with your compiler.

the opencv 4 headers get installed to /usr/local/include/opencv4 , please make sure to adjust your INCLUDE path, when trying to build your own program.

edit flag offensive delete link more

Comments

could you tell me how to adjust the path my include path :/usr/include/opencv

opencv.org gravatar imageopencv.org ( 2019-03-03 22:58:52 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-03-02 00:17:25 -0500

Seen: 52 times

Last updated: Mar 04