Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV source build binaries using Visual Studio 2012, Error LNK1104 & Error C3416

I asked this question in Stackoverflow as well and still wait for answer.

I'm trying to build OpenCV source using Visual Studio 2012. The binaries were built using CMake and Visual Studio generator. Then Build in Debug & Release mode, by loaded the generated solution file (.sln) in Visual Studio. I've been spending hours try to figure out, and still getting nowhere.

Errors

LNK1104 : Cannot open file '..\..\lib\Debug\opencv_dnn320d.lib"
C3416: 'cv::dnn::createLayerFromCaffe' : an explicit specialization may not be explicitly instantiated

and Warnings

C4512: 'cv::bgsegm::BGSubtractPixel' : assignment operator could not be generated
C4512: 'cv::bgsegm::BGSubtractPixelWithHistory' : assignment operator could not be generated
C4512: 'cv::bgsegm::CNTInvoker' : assignment operator could not be generated    
C4512: '`anonymous-namespace'::RandRowFillParallelLoopBody' : assignment operator could not be generated

My guess ?

When Generate binaries in CMake,I need to uncheck something that actually unnecessary,but what?

What I have done ?

  1. Did several changes in CMake and tried re-configure and re-generate, but it always ended up with the same error in VS2012.
  2. Re-Build in Debug & Release mode again Visual Studio (Yes, Build took time)
  3. Looking up for the same error online, but nothing close to my error case.

And because building process takes like 'forever' in Visual Studio, it would really helpful if someone could help me with information about my error so I can make change in CMake and Generate the new binaries to be built using Visual Studio.

Thanks in advance.