Unresolved external character error when connecting to OpenCV 3.0

I will build OpenCV 3.0 from the source. And using repo for some additional modules. And I manually set up the VS2013 project to use the generated lib files.

My code is simple:

#include "opencv2\core\core.hpp"
#include "opencv2\imgcodecs\imgcodecs.hpp"

int _tmain(int argc, _TCHAR* argv[])
{
    cv::Mat image = cv::imread("img.jpg");
    return 0;
}

But he gave me these errors when in the VS 2013 community version:

enter image description here

I see a similar thread , they said it was caused by x86 / x64 problem. But my project is already x86. And the OpenCV I built is also x86 oriented (see below). What could be the reason?

enter image description here

ADD 1

The OpenCV 3.0 project INSTALLcreates the following lib directory:

So it really is x86.

enter image description here

My lib path is set to the specified path:

enter image description here

And I added all the files *d.lib.

enter image description here

And below is my VC project Configuration Manager

enter image description here

x86.

?

ADD 2

fastFree(). opencv_core300d.lib. dumpbin /symbols . , fastFree@cv@@YAXPAX@Z. ?

+2
2

OpenCV 3.0.0 ++, OpenCV , Windows ( Windows 8.1) Visual Studio ( Visual Studio 2013) :

#include <opencv2\opencv.hpp>
using namespace cv;

int main()
{
    Mat3b img = imread("path_to_image");
    imshow("img", img);
    waitKey();
    return 0;
}
  • http://opencv.org/downloads.html
  • OPENCV_DIR: dir, :
  • :
    • → Visual ++ →
  • cpp (, Start.cpp), (, )
  • DEBUG
  • include lib:
    • → V++
    • : OPENCV_DIR\build\include
    • : OPENCV_DIR\build\x86\vc12\staticlib
  • ( : , ):

    • opencv_core300d.lib
    • opencv_highgui300d.lib
    • opencv_imgproc300d.lib
    • opencv_hal300d.lib
    • opencv_imgcodecs300d.lib
    • libjpegd.lib;
    • libpngd.lib
    • libjasperd.lib
    • IlmImfd.lib
    • libtiffd.lib
    • libwebpd.lib
    • zlibd.lib
    • ippicvmt.lib
    • % (AdditionalDependencies)
  • → C/++ → →

    • (/MTd)
  • RELEASE 6 9 , "d" 8 Multi threaded (/MT) 9.

  • !

Image Watch Visual Studio. Mat s!

+5

, . 64 "Project Properties -> Configuration Manager", lib, x86 libs. (, , , )

0

Source: https://habr.com/ru/post/1598716/


All Articles