2

I am doing a simple test project in opencv concept in version 3.0.0. I am using Visual Studio 2013 at Windows 10 system.

Step by step I am getting new errors and solving them, but this time I can't handle it. I have checked a lot of things different without success.

What I am getting from Visual Studio are few hundreds errors like this:

Error   1   error LNK2019: unresolved external symbol _ippicvsFlip_16u_I@8 referenced in function "enum IppStatus (__stdcall*__cdecl cv::getFlipFunc(int))(void *,int)" (?getFlipFunc@cv@@YAP6G?AW4IppStatus@@PAXH@ZH@Z)    D:\myPrograms\test\ConsoleApplication2\ConsoleApplication2\opencv_core300d.lib(matrix.obj)  ConsoleApplication2

All of them are in similar syntax.

There are few more details:

I have added path in system: %OPENCV_DIR%\x86\vc12\staticlib\ where OPENCV_DIR = c:\opencv\build\

I have tried to compile program with target machine platform x64 as well as x86.

I have added: "C:\opencv\build\include" into Additional Include Directories at C/C++ -> General "C:\opencv\build\x64\vc12\staticlib" into Additional Library Directories at Linker -> General "opencv_core300d.lib opencv_imgcodecs300d.lib opencv_imgproc300d.lib opencv_highgui300d.lib" (each in new line) into Additional Dependencies at Linker - Input.

All three options above same for Debug and Release (in Release without d at the end of the name in last point above).

Anyone have and idea how I can fix it ? May you tell me what else I have confugured wrong ? I suppose that still linker do not see libraries. But have no idea how I can fix it.

Feel welcome to ask about some things I have not mentioned.

Thanks in advance and have a nice day.

edit: I have checked some other post like this one for example:

error LNK2019: unresolved external symbol _ Open CV program

edit2: And that is the code which crash:

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/imgcodecs/imgcodecs.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, char** argv)
{
    if (argc != 2)
    {
        cout << " Usage: display_image ImageToLoadAndDisplay" << endl;
        return -1;
    }

    Mat image;
    image = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file

    if (!image.data)                              // Check for invalid input
    {
        cout << "Could not open or find the image" << std::endl;
        return -1;
    }

    namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
    imshow("Display window", image);                   // Show our image inside it.

    waitKey(0);                                          // Wait for a keystroke in the window
    return 0;
}

and that is the code which run without problems:

#include <iostream>
#include <opencv2\opencv.hpp>

using namespace std;

void main()
{
    cout << "OpenCV Version: " << CV_VERSION << std::endl;
    int i;
    cin >> i;
}
Community
  • 1
  • 1
jan kowalski
  • 189
  • 3
  • 21
  • 1
    Possible duplicate of [opencv : unresolved external symbol](http://stackoverflow.com/questions/27491041/opencv-unresolved-external-symbol) – Miki Oct 21 '15 at 12:56
  • Adding those 9 mentioned libraries reduced errors from more than 500 into 20. So I guess we are on the right way, just there are something more missing, I mean maybe one more lib is lacking ? – jan kowalski Oct 21 '15 at 13:04
  • 1
    what's the current error? – Miki Oct 21 '15 at 13:10
  • same errors just reduced number – jan kowalski Oct 21 '15 at 13:11
  • check also [this](http://stackoverflow.com/a/31545237/5008845) – Miki Oct 21 '15 at 13:14
  • 1
    hey Miki, it looks that it solve my problem, however I am not sure because a while after that it compile my Windows got problems (because of hybrid graphics configuration), but it looks like it solved the problem, if not I will write something at the moment I fix the problem thank you for your help and support :) – jan kowalski Oct 22 '15 at 13:24
  • Glad it works. If that answer helped, feel free to upvote it :D – Miki Oct 22 '15 at 15:24

1 Answers1

0

Besides the dependencies specified in the link posted by @Miki, try adding Vfw32.lib.

Community
  • 1
  • 1
Eric Omine
  • 489
  • 4
  • 15