I have the following program:
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv2/imgproc/imgproc_c.h>
int main(int argc, char** argv) {
return 0;
}
I run the following gcc command:
gcc -std=c99 -I/shared/sav/opt/include -I/shared/sav/opt/include/opencv -I/shared/sav/opt/include/opencv2 -I/shared/sav/Downloads/openCV-2.3.1/include -L/shared/sav/opt/lib -L/shared/sav/Downloads/openCV-2.3.1/build/lib -lopencv_highgui -lopencv_imgproc -lopencv_core -lm my_program.c -o my_program
and I have the following error messages:
/tmp/cczX8weZ.o: In function `cvDecRefData':
my_program.c:(.text+0xa68): undefined reference to `cvFree_'
/tmp/cczX8weZ.o: In function `cvGetRow':
my_program.c:(.text+0xbc0): undefined reference to `cvGetRows'
...
and other things like those above.
What is the cause of the problem and how can I solve it?