<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.2 (installed from apt)</li>
<li>Operating System / Platform =&gt; Ubuntu 20.04</li>
<li>Compiler =&gt; gcc 10.3.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="undefined reference to `cv::SparseMatConstIterator::operator--()'"><pre class="notranslate"><code class="notranslate">undefined reference to `cv::SparseMatConstIterator::operator--()'
</code></pre></div>
<p dir="auto">btw, I searched the source code of version 4.5.5, still not found the definition of <code class="notranslate">cv::SparseMatConstIterator::operator--</code><br>
related source file: <a href="https://github.com/opencv/opencv/blob/4.x/modules/core/src/matrix_iterator.cpp"><code class="notranslate">opencv/modules/core/src/matrix_iterator.cpp</code></a></p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="cv::SparseMatConstIterator iter = sparseMat.end();
iter--;"><pre class="notranslate">cv::SparseMatConstIterator iter = sparseMat.end();
iter--;</pre></div>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found any solution

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to the latest OpenCV version and the issue is still there


</li>
</ul>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 3.2 and 4.2</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04 and 20.04 for OpenCV 3.2 and 4.2, respectively</li>
<li>Compiler =&gt; clang 12</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="undefined reference to `cv::ocl::Program::Program(const String&amp;)'
undefined reference to `cv::SparseMatConstIterator::operator--()'"><pre class="notranslate"><code class="notranslate">undefined reference to `cv::ocl::Program::Program(const String&amp;)'
undefined reference to `cv::SparseMatConstIterator::operator--()'
</code></pre></div>
<ul dir="auto">
<li><code class="notranslate">cv::ocl::Program::Program(const String&amp;)</code>: defined in <a href="https://github.com/opencv/opencv/blob/3.2.0/modules/core/include/opencv2/core/ocl.hpp#L604">ocl.hpp#L604</a>, but not implemented in OpenCV 3.2</li>
<li><code class="notranslate">cv::SparseMatConstIterator::operator--()</code>: defined in <a href="https://github.com/opencv/opencv/blob/3.2.0/modules/core/include/opencv2/core/mat.hpp#L3058-L3061">mat.hpp#L3058-L3061 (3.2)</a>,  <a href="https://github.com/opencv/opencv/blob/3.4/modules/core/include/opencv2/core/mat.hpp#L3255-L3258">mat.hpp#L3255-L3258 (3.4)</a>, and <a href="https://github.com/opencv/opencv/blob/4.x/modules/core/include/opencv2/core/mat.hpp#L3255-L3258">mat.hpp#L3255-L3258 (4.x)</a>, but not implemented in OpenCV 3.2/3.4/4.x</li>
</ul>
<h5 dir="auto">Steps to reproduce</h5>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# install OpenCV 3.2 for Ubuntu 18.04
# install OpenCV 4.2 for Ubuntu 20.04
sudo apt install libopencv-dev"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> install OpenCV 3.2 for Ubuntu 18.04</span>
<span class="pl-c"><span class="pl-c">#</span> install OpenCV 4.2 for Ubuntu 20.04</span>
sudo apt install libopencv-dev</pre></div>
<p dir="auto">For OpenCV 3.2:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ objdump -TC /usr/lib/x86_64-linux-gnu/libopencv_*.so | grep cv::ocl::Program::Program
0000000000161610 g    DF .text	0000000000000011  Base        cv::ocl::Program::Program(cv::ocl::Program const&amp;)
000000000016eb20 g    DF .text	000000000000000c  Base        cv::ocl::Program::Program(cv::ocl::ProgramSource const&amp;, cv::String const&amp;, cv::String&amp;)
000000000016eb20 g    DF .text	000000000000000c  Base        cv::ocl::Program::Program(cv::ocl::ProgramSource const&amp;, cv::String const&amp;, cv::String&amp;)
0000000000161600 g    DF .text	0000000000000008  Base        cv::ocl::Program::Program()
0000000000161600 g    DF .text	0000000000000008  Base        cv::ocl::Program::Program()
0000000000161610 g    DF .text	0000000000000011  Base        cv::ocl::Program::Program(cv::ocl::Program const&amp;)
0000000000000000      DF *UND*	0000000000000000              cv::ocl::Program::Program(cv::ocl::ProgramSource const&amp;, cv::String const&amp;, cv::String&amp;)"><pre class="notranslate">$ <span class="pl-s1">objdump -TC /usr/lib/x86_64-linux-gnu/libopencv_<span class="pl-k">*</span>.so <span class="pl-k">|</span> grep cv::ocl::Program::Program</span>
<span class="pl-c1">0000000000161610 g    DF .text	0000000000000011  Base        cv::ocl::Program::Program(cv::ocl::Program const&amp;)</span>
<span class="pl-c1">000000000016eb20 g    DF .text	000000000000000c  Base        cv::ocl::Program::Program(cv::ocl::ProgramSource const&amp;, cv::String const&amp;, cv::String&amp;)</span>
<span class="pl-c1">000000000016eb20 g    DF .text	000000000000000c  Base        cv::ocl::Program::Program(cv::ocl::ProgramSource const&amp;, cv::String const&amp;, cv::String&amp;)</span>
<span class="pl-c1">0000000000161600 g    DF .text	0000000000000008  Base        cv::ocl::Program::Program()</span>
<span class="pl-c1">0000000000161600 g    DF .text	0000000000000008  Base        cv::ocl::Program::Program()</span>
<span class="pl-c1">0000000000161610 g    DF .text	0000000000000011  Base        cv::ocl::Program::Program(cv::ocl::Program const&amp;)</span>
<span class="pl-c1">0000000000000000      DF *UND*	0000000000000000              cv::ocl::Program::Program(cv::ocl::ProgramSource const&amp;, cv::String const&amp;, cv::String&amp;)</span></pre></div>
<p dir="auto">For OpenCV 3.2 and 4.2:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ objdump -TC /usr/lib/x86_64-linux-gnu/libopencv_*.so | grep cv::SparseMatConstIterator::operator
000000000013d890 g    DF .text	0000000000000094  Base        cv::SparseMatConstIterator::operator++()
0000000000000000      DF *UND*	0000000000000000              cv::SparseMatConstIterator::operator++()"><pre class="notranslate">$ <span class="pl-s1">objdump -TC /usr/lib/x86_64-linux-gnu/libopencv_<span class="pl-k">*</span>.so <span class="pl-k">|</span> grep cv::SparseMatConstIterator::operator</span>
<span class="pl-c1">000000000013d890 g    DF .text	0000000000000094  Base        cv::SparseMatConstIterator::operator++()</span>
<span class="pl-c1">0000000000000000      DF *UND*	0000000000000000              cv::SparseMatConstIterator::operator++()</span></pre></div>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found any solution</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to the latest OpenCV version and the issue is still there</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> There is reproducer code and related data files: videos, images, onnx, etc</li>
</ul>