$ g++ pkg-config --libs --cflags opencv
-o cv2 cv2.cpp
/tmp/ccuiICVX.o: In function main':
cv2.cpp:(.text+0x23): undefined reference to
cvLoadImage'
cv2.cpp:(.text+0x36): undefined reference to cvNamedWindow'
cv2.cpp:(.text+0x47): undefined reference to
cvShowImage'
cv2.cpp:(.text+0x51): undefined reference to cvWaitKey'
cv2.cpp:(.text+0x5d): undefined reference to
cvReleaseImage'
cv2.cpp:(.text+0x67): undefined reference to `cvDestroyWindow'
collect2: error: ld returned 1 exit status
Can anyone please help me to fix this problem?