Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

compile opencv program

prashad@ubuntu:~/$ g++  sample.cpp `pkg-config --cflags --libs opencv` 

NOTE: compiling any program for opencv , we need to add `pkg-config --flags --libs opencv` otherwise it prompts undefined references errors. to eliminate below errors please compile like above command.
Compilation errors:
open_videofile.cpp:(.text+0x53): undefined reference to `cv::VideoCapture::VideoCapture(cv::String const&)'
open_videofile.cpp:(.text+0x71): undefined reference to `cv::VideoCapture::isOpened() const'
open_videofile.cpp:(.text+0xca): undefined reference to `cv::VideoCapture::get(int) const'

tags: ubuntu, C++, opencv
usefull link: 
https://www.learnopencv.com/how-to-compile-opencv-sample-code/
Source by www.learnopencv.com #
 
PREVIOUS NEXT
Tagged: #compile #opencv #program
ADD COMMENT
Topic
Name
1+5 =