Ask Your Question

Revision history [back]

OpenCV 3.1 - unresolved external symbol cvUpdateMotionHistory

I'm using OpenCV 3.1 and have compiled together opencv_contrib downloaded from GitHub on 2016-3-24.

I have these codes that detect moving vehicles in video and am trying to build it with VS2012 on Windows 7.

One line of the codes is cvUpdateMotionHistory:

cvUpdateMotionHistory( silh, mhi, timestamp, MHI_DURATION );

The only errors I got are these:

1>ocv-test-vc11.obj : error LNK2001: unresolved external symbol cvUpdateMotionHistory
1>E:\projects\C++\OpenCV\ocv-test-vc11\x64\Release\ocv-test-vc11.exe : fatal error LNK1120: 1 unresolved externals

The other lines work just fine, because when I comment out this single line, the solution can be successfully built and run.

I have linked opencv_video310.lib and opencv_optflow310.lib in Linker | Input. In fact, I have linked every single .lib file in my opencv's vc11\lib directory.

How do I solve this LNK error?