I am trying just a basic program with OpenCV with the following code:
#include "cv.h"
#include "highgui.h"
int main()
{
IplImage* newImg;
newImg = cvLoadImage("~/apple.bmp", 1);
cvNamedWindow("Window", 1);
cvShowImage("Window", newImg);
cvWaitKey(0);
cvDestroyWindow("Window");
cvReleaseImage(&newImg);
return 0;
}
When I run this, I get
The program can't start because libcxcore200.dll is missing from your computer. Try reinstalling the program to fix this problem.
However, I can see this DLL. It exists. I have added the following to the input dependencies for my linker
C:OpenCV2.0liblibcv200.dll.a C:OpenCV2.0liblibcvaux200.dll.a C:OpenCV2.0liblibcxcore200.dll.a C:OpenCV2.0liblibhighgui200.dll.a
What gives? I'm using visual studio 2008.
When I link the .dll files instead of .dll.a files, I get
See Question&Answers more detail:osfatal error LNK1107:invalid or corrupt file: cannot read at 0x3F8 libcv200.dll