LNK2005 Error linking static openCV libraries with Visual Studio and QT Creator

前端 未结 3 1442
甜味超标
甜味超标 2021-01-18 12:41

I built the static openCV 2.3 libraries. My project currently uses the dynamic ones with no problem, but now I want to use static libs. I added the libs to my .pro file:

3条回答
  •  旧巷少年郎
    2021-01-18 13:14

    The problem seem to be that your linker attempts to combine different, incompatible versions of the Visual C++ runtime library (CRT) into one single binary.
    Let me guess in the wild: Each part of your project and the libraries you link against are NOT generated with the same code generation options in Visual C++.
    I wonder if the /NODEFAULTLIB switch 'd solve this challenge?

提交回复
热议问题