Ask Your Question
0

using -l in g++ command line

asked Mar 22 '0

andrei186 gravatar image

Is it correct to assume that for every opencv header included into the cpp file

#include <opencv2/xxx.hpp>

-lopencv_xxx needs to be added to g++ command line?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Mar 23 '0

juanmamdp gravatar image

updated Mar 23 '0

Add this `pkg-config --libs --cflags opencv` (OpenCV 2.x and 3.x) or `pkg-config --libs --cflags opencv4` -std=c++11 (OpenCV 4.x) to your compilation line and you will have everything you need to compile.

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Mar 22 '0

Seen: 532 times

Last updated: Mar 23 '20