UPGRADE YOUR BROWSER
We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!
09-18-2018 05:10 AM
I would like to capture video with cv::videocapture cap(0) function, and then do the image processing.
The code like this:
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/video/video.hpp>
cv::VideoCapture cap(0);
However, the following errors pop up when I compile the code:
C:/taosdsoc/tao_hog/test/tao_test/Release/src/xf_hog_descriptor_tb.o: In function `main':
xf_hog_descriptor_tb.cpp:(.text.startup+0x74): undefined reference to `cv::VideoCapture::VideoCapture()'
xf_hog_descriptor_tb.cpp:(.text.startup+0x80): undefined reference to `cv::VideoCapture::open(int)'
xf_hog_descriptor_tb.cpp:(.text.startup+0x9ac): undefined reference to `cv::VideoCapture::~VideoCapture()'
xf_hog_descriptor_tb.cpp:(.text.startup+0x9e4): undefined reference to `cv::VideoCapture::~VideoCapture()'
I am not sure what is reason for the errors?
Thank you in advance.
09-19-2018 07:17 PM
09-19-2018 01:40 AM
Hi,
It is unable to find API declaration.
Please check your include path.
C/C++ settings->C/C++ General->Paths and symbols
check for warning sign on include paths
Best Regards,
Nutan
09-19-2018 06:59 PM
Hi nutang, thanks for your message!
Here is the error message!
collect2.exe: error: ld returned 1 exit status
ERROR: [SdsCompiler 83-5019] Exiting sds++ : Error when calling 'aarch64-linux-gnu-g++
the compile pops up errors when calling aarch64-linux-gnu-g++
09-19-2018 07:17 PM
09-20-2018 01:07 AM
Hi lulugay,
Thanks for your reply.
The solution perfectly works for my project.
01-07-2019 07:53 AM
Hello,
I was having the same problem and followed the solution but I am still having a linker problem as following
H:/Xilinx/work/zed_test/src/main.cpp:13: undefined reference to `cv::VideoCapture::retrieve(cv::Mat&, int)'
H:/Xilinx/work/zed_test/src/main.cpp:14: undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
H:/Xilinx/work/zed_test/src/main.cpp:14: undefined reference to `cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
Could you please provide some details of how you have solved this issue?
I am using zcu102 with SDSoC (2017.4) in windows 10.