Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to compile a simple display image code in opencv on Ubuntu Linux platform but I am getting some errors as follows:

gcc: error: ‘pkg-config: No such file or directory
gcc: error: opencv‘: No such file or directory
gcc: error: unrecognized option ‘--cflags’
gcc: error: unrecognized option ‘--libs’

please can some one help me?

share|improve this question

1 Answer 1

Please remember to include the command that's producing the error as well.

In this case I am guessing that you copy-pasted the gcc command line from somewhere and the punctuation got mangled

$ gcc -o hello ‘pkg-config --cflags --libs opencv‘ hello.cpp
gcc: error: ‘pkg-config: No such file or directory
gcc: error: opencv‘: No such file or directory
gcc: error: unrecognized option ‘--cflags’
gcc: error: unrecognized option ‘--libs’

The correct punctuation around the pkg-config string should be "backticks" not the forward ticks ‘ ... ‘ that you seem to have i.e.

$ gcc -o hello `pkg-config --cflags --libs opencv` hello.cpp
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.