Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Issue with build on symbols OpenCV 3.2.0 / VS2015 / Release (x64)

Hey all

I've been hitting a problem for a couple of days now of getting OpenCV to run within a project with VS2015 but am having library linking problems.

Specifically, I'm the maintainer of the ofxCvMin addon for openFrameworks, and am currently trying to upgrade the libraries from 2.4.x to 3.2.0. (I've built and linked opencv libs a few times for windows and osx over the years).

I can successfully build Debug and Release libs (this wasn't an issue at all). (note : current setup is static libs, not using static CRT)

I managed to build an application linking the debug libraries (with a little extra help on #opencv IRC), but Release is still is not working. VC++ doesn't seem to recognise the imported symbols.

Diggiging deeper, it seems that the C++ application is looking for :

?deallocate@Mat@cv@@QAEXXZ
public: void __thiscall cv::Mat::deallocate(void)

when building. But in opencv_core320.lib we have:

?deallocate@Mat@cv@@QEAAXXZ
public: void __cdecl cv::Mat::deallocate(void) __ptr64

which VC++ doesn't consider to be a compatible symbol. I presume there are some project settings which affect the symbol naming strategy (__thiscall <> __cdecl hints at a C++ vs C style).

Is anybody aware of project settings which affect how the symbols are decorated when using OpenCV with VC++?

Thank you

NB : CMAKE is not an option here as the projects/solutions need to be openFrameworks generated (although could be used to look into which build settings are present)