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;
}