You are not logged in.

#1 2018-12-19 07:55:28

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

[SOLVED]compiling c++ code with opencv fails but python opencv works.

I installed opencv package from the repository. And I could use the package seamlessly with python. I wanted to do the same thing with c++ but I couldn't achieve it due to the following things.

compiling the c++ code gives me the following,

 fatal error: opencv2/core.hpp: No such file or directory. Compilation terminated. 

Running the

 pkg-config --libs opencv 

returns the following stuff,

 Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
Package 'opencv', required by 'virtual:world', not found 

Trying to find the package opencv.pc returns the following,

 find: 'opencv.pc': No such file or directory 

Last edited by beefshepherd (2018-12-19 09:53:46)

Offline

#2 2018-12-19 08:00:11

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,311

Re: [SOLVED]compiling c++ code with opencv fails but python opencv works.

It's called opencv4.pc

Offline

#3 2018-12-19 08:41:59

beefshepherd
Member
Registered: 2018-08-28
Posts: 16

Re: [SOLVED]compiling c++ code with opencv fails but python opencv works.

Oh thanks, didn't realize that such a dumb mistake neutral

Offline

Board footer

Powered by FluxBB