Ask Your Question

Android studio: undefined reference to cv::Stitcher

asked 2019-07-10 20:10:57 -0500

FanFM gravatar image

I am using opencv library. I want do

#include <jni.h>
#include <string>
#include "opencv2/opencv.hpp"
#include "opencv2/stitching.hpp"

using namespace std;
using namespace cv;
Ptr<cv::Stitcher> stitcher = Stitcher::create();

but I have error:

undefined reference to `cv::Stitcher::create(cv::Stitcher::Mode)'
edit retag flag offensive close merge delete


uhh, do you have libopencv_stitching.a or there ? you need to link to that.

if you built with BUILD_SHARED_LIBS=OFF,it probably won't get generated

berak gravatar imageberak ( 2020-04-07 09:37:50 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2020-04-07 09:06:53 -0500

zelda gravatar image

you might have forgot to link the stitching lib , check your linker and add


edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2019-07-10 20:10:57 -0500

Seen: 247 times

Last updated: Apr 07