codeblocks's undefined reference to 'cv::waitKey of int'
- 2020-06-23 01:19:09
- OfStack
Undefined reference to 'cv::waitKey(int)'
I always thought it was the reason of C++11 or g++ version. I see:
http://forum.ubuntu.com.cn/viewtopic.php?f=48 & t = 377522 is put forward:
g++ `pkg-config --cflags --libs opencv` lena.cpp -o lena
This will fail to compile, while
g++ lena.cpp `pkg-config --cflags --libs opencv` -o lena
It will be successful. I tried 1 and sure enough it was.