Ask Your Question
0

how to resolves this ??? have installed visual studio c++ 2010 and opencv 2.4.9

asked 2014-08-26 05:42:42 -0600

nitin gravatar image

updated 2014-08-26 06:07:02 -0600

thdrksdfthmn gravatar image

am trying to run this code

#include <opencv\cv.h>
#include <opencv\highgui.h>

using namespace cv;

int main()
{
    IplImage* img=cvLoadImage("C:\\Users\\nmi6kor\\Desktop\\index.jpg");
    cvNamedWindow("Example1",CV_WINDOW_NORMAL);
    cvShowImage("Example1",img);
    cvWaitKey(0);
    cvReleaseImage(&img);
    cvDestroyWindow("Example1");
    return 0;
}

when I build the solution it is showing error..

1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
edit retag flag offensive close merge delete

Comments

1

Okay lets start with the standard questions:

  1. Why are you using the C-API which is depricated, old and poorly developed? I urge you to move to the much better supported C++-API.
  2. A simple google, as explained in the FAQ could already guide you to the solution ... it was my first hit in google right here, just disabling incremental linking.

And again, stop using the OLD api, it will get you more headaches then needed.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-26 07:10:54 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-09-21 15:49:21 -0600

Cross22 gravatar image

It's a bug in Visual Studio 2010 that I just ran into. Disabling incremental linking did not resolve it. After installing the VS 2010 SP1 update the linker worked.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-08-26 05:42:42 -0600

Seen: 1,011 times

Last updated: Sep 21 '14