<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji> 3.4.3 native sdk</li>
<li>Operating System / Platform =&gt; ❔ Mac OS</li>
<li>Compiler =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji> native c++ android studio</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">undefined reference to `cv::dnn::experimental_dnn_34_v7::Net::forward(cv::_OutputArray const&amp;, std::__ndk1::vector&lt;cv::String, std::__ndk1::allocatorcv::String &gt; const&amp;)'<br>
clang++: error: linker command failed with exit code 1 (use -v to see invocation)<br>
ninja: build stopped: subcommand failed.</p>
<h5 dir="auto">Steps to reproduce</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" #include &lt;jni.h&gt;
 #include &lt;string&gt;

 #include &lt;opencv2/imgproc.hpp&gt;
 #include &lt;opencv2/highgui.hpp&gt;
 #include &lt;opencv2/dnn.hpp&gt;

using namespace std;
using namespace cv;
using namespace cv::dnn;


extern &quot;C&quot; JNIEXPORT jstring JNICALL
Java_com_example_mats86_myapplication_MainActivity_stringFromJNI(
    JNIEnv *env,
    jobject /* this */) {

std::string hello = &quot;Hello from C++&quot;;
float confThreshold = 0.5;
float nmsThreshold = 0.4;
int newW = 320;
int newH = 320;
String model = &quot;/storage/emulated/0/DCIM/ImageProcessing/tessdata/frozen_east_text_detection.pb&quot;;

string imPath = &quot;/storage/emulated/0/DCIM/ImageProcessing/test.jpg&quot;;

Mat im = imread(imPath, IMREAD_COLOR);
Mat orig;
im.copyTo(im);
int origH = im.rows;
int origW = im.cols;

int rW = (int) (origW / float(newW));
int rH = (int) (origH / float(newH));

resize(im, im, Size(newW, newH));
int H = im.rows;
int W = im.cols;

vector&lt;Mat&gt; outs;
vector&lt;String&gt; layerNames(2);
layerNames[0] = &quot;feature_fusion/Conv_7/Sigmoid&quot;;
layerNames[1] = &quot;feature_fusion/concat_3&quot;;

Net net = readNet(model);

// construct a blob from the image and then perform a forward pass of
// the model to obtain the two output layer sets
Mat frame, blob;
blobFromImage(frame, blob, 1.0, Size(newW, newH), Scalar(123.68, 116.78, 103.94), true, false);
net.setInput(blob);
net.forward(outs, layerNames);  // undefined reference to `cv::dnn::experimental_dnn_34_v7

return env-&gt;NewStringUTF(hello.c_str());"><pre class="notranslate"><code class="notranslate"> #include &lt;jni.h&gt;
 #include &lt;string&gt;

 #include &lt;opencv2/imgproc.hpp&gt;
 #include &lt;opencv2/highgui.hpp&gt;
 #include &lt;opencv2/dnn.hpp&gt;

using namespace std;
using namespace cv;
using namespace cv::dnn;


extern "C" JNIEXPORT jstring JNICALL
Java_com_example_mats86_myapplication_MainActivity_stringFromJNI(
    JNIEnv *env,
    jobject /* this */) {

std::string hello = "Hello from C++";
float confThreshold = 0.5;
float nmsThreshold = 0.4;
int newW = 320;
int newH = 320;
String model = "/storage/emulated/0/DCIM/ImageProcessing/tessdata/frozen_east_text_detection.pb";

string imPath = "/storage/emulated/0/DCIM/ImageProcessing/test.jpg";

Mat im = imread(imPath, IMREAD_COLOR);
Mat orig;
im.copyTo(im);
int origH = im.rows;
int origW = im.cols;

int rW = (int) (origW / float(newW));
int rH = (int) (origH / float(newH));

resize(im, im, Size(newW, newH));
int H = im.rows;
int W = im.cols;

vector&lt;Mat&gt; outs;
vector&lt;String&gt; layerNames(2);
layerNames[0] = "feature_fusion/Conv_7/Sigmoid";
layerNames[1] = "feature_fusion/concat_3";

Net net = readNet(model);

// construct a blob from the image and then perform a forward pass of
// the model to obtain the two output layer sets
Mat frame, blob;
blobFromImage(frame, blob, 1.0, Size(newW, newH), Scalar(123.68, 116.78, 103.94), true, false);
net.setInput(blob);
net.forward(outs, layerNames);  // undefined reference to `cv::dnn::experimental_dnn_34_v7

return env-&gt;NewStringUTF(hello.c_str());
</code></pre></div>
<p dir="auto">}</p>
<h5 dir="auto">System information (version)</h5>

<h5 dir="auto">Detailed description</h5>

<h5 dir="auto">Steps to reproduce</h5>

<p dir="auto">I use the cvGetSize to get the cvsize, but it break, as:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/40679769/70016424-43df5980-15bb-11ea-8884-dc29525f3ff3.png"><img src="https://user-images.githubusercontent.com/40679769/70016424-43df5980-15bb-11ea-8884-dc29525f3ff3.png" alt="图片" style="max-width: 100%;"></a></p>