Unresolved externel symbol



I want to get the captured image with “onImageCapture(Frame image)”.
If I add this line
Mat* mat = image.getImage();
I get an linker error
Error LNK2001 unresolved external symbol “public: class cv::Mat * __cdecl affdex::Frame::getImage(void)”

OpenCV is working, because I use the Mat class on other parts in the code. I got the error only if I use “image.getImage”.

Best regards


Hi Sven, good one. The simple answer, as I’m sure you’ve surmised, is that the method is not exported from the DLL.

So then the question becomes, why not? I dug into the history of this method a little, and it turns out that the intention here was for this method to be available internally to other parts of the SDK implementation, but that it wasn’t intended for client use (to avoid the dependency on opencv).

You should still be able to do what you want, though, by initializing your cv::Mat from the byte array returned from Frame::getBGRByteArray().