Reputation: 23
I'm getting started with opencv in C++.When I try to compile my code, I sometimes get strange linker errors such as:undefined reference to symbol '_ZN2cv6circleERKNS_17_InputOutputArrayENS_6Point_IiEEiRKNS_7Scalar_IdEEiii'.
In the past, I've resolved this by googling around and making sure I'm compiling all the necessary opencv libraries. It's a good amount of guesswork on my part, but it solves the error.
Is there a better to do this? That is, determine which opencv libraries need to be compiled. I am using the g++ compiler btw.
Upvotes: 0
Views: 65
Reputation: 23
Aplogies. I have found the answer: simple append pkg-config --cflags --libs opencv
to your compilation cmd
Upvotes: 1