I’m a new of Ubuntu user.
I’m trying to make RTSP streaming program using OpenCV and GStreamer.
I finished writing my program. But I couldn’t compile.
I tried some command line using g++. But all command I tried did not work.
I had finished installation gstreamer library for RTSP.
My environmet is as follows.
・Jetson Nano
・Image : r32.2.1
my command line and error messages is as below.
$ g++ -o streaming `pkg-config --cflags --libs gstreamer-1.0 gstreamer-video-1.0 opencv gstreamer-rtsp-server-1.0` streaming.cpp
/tmp/cc8LtEzF.o: In function `main':
streaming.cpp:(.text+0xc0): undefined reference to `cv::VideoCapture::VideoCapture(cv::String const&, int)'
streaming.cpp:(.text+0xd0): undefined reference to `cv::VideoCapture::isOpened() const'
streaming.cpp:(.text+0x10c): undefined reference to `cv::VideoCapture::get(int) const'
streaming.cpp:(.text+0x1a8): undefined reference to `cv::VideoWriter::fourcc(char, char, char, char)'
streaming.cpp:(.text+0x1dc): undefined reference to `cv::VideoWriter::VideoWriter(cv::String const&, int, double, cv::Size_<int>, bool)'
streaming.cpp:(.text+0x1ec): undefined reference to `cv::VideoWriter::isOpened() const'
streaming.cpp:(.text+0x260): undefined reference to `cv::namedWindow(cv::String const&, int)'
streaming.cpp:(.text+0x2e4): undefined reference to `g_print'
streaming.cpp:(.text+0x310): undefined reference to `g_print'
streaming.cpp:(.text+0x314): undefined reference to `gst_rtsp_server_new'
streaming.cpp:(.text+0x338): undefined reference to `g_object_set'
streaming.cpp:(.text+0x340): undefined reference to `gst_rtsp_server_get_mount_points'
streaming.cpp:(.text+0x348): undefined reference to `gst_rtsp_media_factory_new'
streaming.cpp:(.text+0x35c): undefined reference to `gst_rtsp_media_factory_set_launch'
streaming.cpp:(.text+0x368): undefined reference to `g_print'
streaming.cpp:(.text+0x380): undefined reference to `gst_rtsp_mount_points_add_factory'
streaming.cpp:(.text+0x388): undefined reference to `g_object_unref'
streaming.cpp:(.text+0x394): undefined reference to `gst_rtsp_server_attach'
streaming.cpp:(.text+0x3ac): undefined reference to `cv::VideoCapture::read(cv::_OutputArray const&)'
streaming.cpp:(.text+0x404): undefined reference to `cv::waitKey(int)'
streaming.cpp:(.text+0x464): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
streaming.cpp:(.text+0x4b8): undefined reference to `cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
streaming.cpp:(.text+0x4d4): undefined reference to `cv::VideoWriter::write(cv::Mat const&)'
streaming.cpp:(.text+0x4f0): undefined reference to `cv::VideoWriter::~VideoWriter()'
streaming.cpp:(.text+0x500): undefined reference to `cv::VideoCapture::~VideoCapture()'
streaming.cpp:(.text+0x604): undefined reference to `cv::VideoWriter::~VideoWriter()'
streaming.cpp:(.text+0x624): undefined reference to `cv::VideoCapture::~VideoCapture()'
/tmp/cc8LtEzF.o: In function `cv::String::String(char const*)':
streaming.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x4c): undefined reference to `cv::String::allocate(unsigned long)'
/tmp/cc8LtEzF.o: In function `cv::String::~String()':
streaming.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x10): undefined reference to `cv::String::deallocate()'
/tmp/cc8LtEzF.o: In function `cv::Mat::~Mat()':
streaming.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x34): undefined reference to `cv::fastFree(void*)'
/tmp/cc8LtEzF.o: In function `cv::Mat::release()':
streaming.cpp:(.text._ZN2cv3Mat7releaseEv[_ZN2cv3Mat7releaseEv]+0x58): undefined reference to `cv::Mat::deallocate()'
/tmp/cc8LtEzF.o: In function `cv::String::String(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
streaming.cpp:(.text._ZN2cv6StringC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN2cv6StringC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x60): undefined reference to `cv::String::allocate(unsigned long)'
collect2: error: ld returned 1 exit status