PCX icon indicating copy to clipboard operation
PCX copied to clipboard

How to compile the C++ code ?

Open rsingh2083 opened this issue 4 years ago • 0 comments

I used this to compile the C++ code, still it doesnt compile

g++ -std=c++11 -O3 -I.. dlib/dlib/all/source.cpp -lpthread -lX11 -I /usr/include/x86_64-linux-gnu/ -L /usr/lib/x86_64-linux-gnu/ -lopencv_core -lopencv_highgui -lopencv_videoio sleep_detection.cpp

ERROR ====>

sleep_detection.cpp:(.text.startup+0x197): undefined reference to `cv::VideoCapture::VideoCapture(int)'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x19f): undefined reference to `cv::VideoCapture::isOpened() const'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x1c1): undefined reference to `cv::VideoCapture::set(int, double)'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x1d6): undefined reference to `cv::VideoCapture::set(int, double)'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x653): undefined reference to `cv::VideoCapture::read(cv::_OutputArray const&)'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0xb88): undefined reference to `cv::fastFree(void*)'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x1454): undefined reference to `cv::waitKey(int)'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x149f): undefined reference to `cv::VideoCapture::~VideoCapture()'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x1606): undefined reference to `cv::Mat::deallocate()'
/usr/bin/ld: sleep_detection.cpp:(.text.startup+0x18e6): undefined reference to `cv::VideoCapture::~VideoCapture()'

rsingh2083 avatar Jul 11 '21 19:07 rsingh2083