First time here? Check out the FAQ!
answered 2018-08-21 04:34:19 -0600
You must link the OpenCV libs while building. Try:
g++ $(shell pkg-config opencv --libs) SplitChannel.cpp -o Split
The pkg-config opencv --libs command will return the list of OpenCV libraries.
pkg-config opencv --libs