tags:

views:

128

answers:

2

Why I try to run the following OpenCV program, it shows the following error :

ERROR:

test_1.exe - Application Error

The application failed to initialize properly (0x80000003). 
Click on OK to terminate the application.

CODE:

#include "cv.h"
#include "highgui.h"

int main()
{
IplImage *img = cvLoadImage("C:\\face.bmp");

cvSetImageROI(img, cvRect(100,100, 100, 100));
cvAddS(img, cvScalar(50), img);
cvResetImageROI(img);
cvShowImage("Test", img);

cvWaitKey(0);

return 0;
}

When i press F5(im using vs2008express), the program encounters a break point...i have attached a picture...dont know, whether, it will help or not.

Error Snapshot Link

It is not that, only this program is producing this error, but also any kind of image manipulation funciton containing (OpenCV)program is resulting in this sitution. Such as : cvSmooth

one last thing, it there any dedicated OpenCV forum or sth like that?

A: 

This usually indicates a problem with a dll; either you don't have permission, or a version is mismatched. Try running as Administrator to see if it is a permissions problem. If that doesn't help, try using the Dependency Walker.

Fred
A: 

I am an administrator.So, yes, ive the permission.

a version mismatch.

sorry, i didn't get it?Version mismatch with what?

But, i have found the error using dependency walker.

Warning: At least one module has an unresolved import due to a missing export 
function in a delay-load dependent module.

and also found that, it is a common problem, and found some info in the FAQ of DW...

Why am I seeing a lot of applications where MPR.DLL shows up in red under 
SHLWAPI.DLL because it is missing a function named WNetRestoreConnectionA? 
I also get a "Warning: At least one module has an unresolved import due to 
a missing export function in a delay-load dependent module" message.

Function name : WNetRestoreConnectionA

But there is no guideline about how to solve it. Though, they say, it is not a problem.

i googled a little and found a suggestion.It says,

Turn off your compilers setting to assume you are programming for Win9x. 
(I just lost which setting but it is not that difficult, use a #define...)    

But i have no idea, how to do that in Visual Studio 2008 express.

Any suggestion how to solve it...

iamcreasy