hi,
I am trying to compile the hello world opencv program,
g++ hello.c -o hello
And I am getting the following errors:
/tmp/cca4w5Eo.o: In function `main':
hello.c:(.text+0x23): undefined reference to `cvLoadImage'
hello.c:(.text+0x36): undefined reference to `cvNamedWindow'
hello.c:(.text+0x47): undefined reference to `cvShowImage'
hello.c:(.text+0x51): undefined reference to `cvWaitKey'
hello.c:(.text+0x5d): undefined reference to `cvReleaseImage'
hello.c:(.text+0x67): undefined reference to `cvDestroyWindow'
collect2: ld returned 1 exit status
Look into the -l, -I, and -L options of g++; -l specifies the library to link with, -I specifies the path to include header files, and -L specifies the library path. You might be looking for the LD_LIBRARY_PATH environment variable after you get it compiled.