Skip to main content
Kofax

Conflict Between Kofax MobileSDK and OpenCV

3023997

Question / Problem: 

Customer is running into a conflict between Kofax (MobileSDK.framework) and OpenCV2.

It seems that the MobileSDK is embedding the OpenCV symbols, below is the error they are having:

duplicate symbol 'cv::Mat::push_back_(void const*)' in:
/MobileSDK/MobileSDK.framework/MobileSDK(matrix.o)
/opencv2/opencv2.framework/opencv2(matrix.o)

duplicate symbol 'cv::TLSDataContainer::gatherData(std::__1::vector<void*, std::__1::allocator<void*> >&) const' in:
/MobileSDK/MobileSDK.framework/MobileSDK(system.o)
/opencv2/opencv2.framework/opencv2(system.o)


They tried removing the duplicate object files, but it seems that the version of opencv that they use is not the same as the one used in MobileSDK, because the symbol is missing:

stderr: undef: __ZN7CvMatNDC1ERKN2cv3MatE
Undefined symbols for architecture x86_64:
"CvMatND::CvMatND(cv::Mat const&)", referenced from:
cv::write(cv::FileStorage&, cv::String const&, cv::Mat const&) in MobileSDK(persistence.o)
 

Answer / Solution: 

The Kofax Mobile SDK framework does implement OpenCV framework internally.

Unfortunately, you can not use your OpenCV version in your projects that are built with the Kofax MobileSDK.

 

 

 

 

Applies to:  

Product Version
Kofax Mobile SDK 3.5