Raspberry Pi C Program with OpenCV - cvGrabeFrame linking error

asked 2015-08-03 11:39:50 -0500

I have been trying, unsuccessfully, to compile my c program for using openCV on the linux-based operating system run on Raspberry Pi, Raspbian. The goal is to interface with the RPi camera, incorporating OpenCV. I have searched similar errors but only found mentions of C++ programs with this specific problem. I do not want this in C++, I want to solve the problem using C programming.

I am compiling a file ending in .c with the following command in the linux LXTerminal:

gcc -o testcode testcode.c -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_features2d -lopencv_objdetect

I get the following errors: /usr/bin/ld: /tmp/ccxluxYC.o: undefined reference to symbol 'cvGrabFrame' //usr/local/lib/libopencv_videoio.so.3.0: error adding symbols: DSO missing from command line collect2: ld returned 1 exit status

I would assume that I am not linking with a library. Any suggestions? Additionally, how do I link with DSO in the command line?

Thanks!

edit retag flag offensive close merge delete

Comments

2

"I want to solve the problem using C programming." - unfortunately, that's no more an option, you will have to use c++ (and cv2 / numpy in python)

berak gravatar imageberak ( 2015-08-03 11:53:15 -0500 )edit