cv mat undefined reference code example Example: undefined reference to `cv::waitKey(int)' g++ -o test_1 test_1.cpp `pkg-config opencv --cflags --libs`