answered 2017-01-27 09:56:26 -0600
if pkg-config fails for you, you could still try to:
or just write one manually:
g++ my.cpp -I.-I/usr/local/include -L/usr/local/lib -lopencv_core -lopencv_imgcodecs -lopencv_highgui -o myprog