Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unable to load my first opencv file

$ g++ pkg-config --libs --cflags opencv -o cv2 cv2.cpp /tmp/ccuiICVX.o: In function main': cv2.cpp:(.text+0x23): undefined reference tocvLoadImage' cv2.cpp:(.text+0x36): undefined reference to cvNamedWindow' cv2.cpp:(.text+0x47): undefined reference tocvShowImage' cv2.cpp:(.text+0x51): undefined reference to cvWaitKey' cv2.cpp:(.text+0x5d): undefined reference tocvReleaseImage' cv2.cpp:(.text+0x67): undefined reference to `cvDestroyWindow' collect2: error: ld returned 1 exit status

Can anyone please help me to fix this problem?

click to hide/show revision 2
No.2 Revision

Unable to load my first opencv file

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

status

Can anyone please help me to fix this problem?