Ask Your Question
0

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

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

opencv.org gravatar image

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 -0600

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 -0600 )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 -0600 )edit
0

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

berak gravatar image

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

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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 1,208 times

Last updated: Mar 04 '19