views:

212

answers:

1

Hi, I have an image processing C program which uses OpenCV library. I was developping this with Visual Studio 2008 until this happened. So I moved the whole project to netbeans(6.9) and MinGW.

I have configured netbeans to use OpenCV libraries as guided in this blog.

But when I run the program it gives this error " The application failed to initalize properly (0xc0150002) "

I dont think this happens when trying to read any image files from the hard disk. It gives the error without even excuting 1st line in the main method.

The only change I made to the code is this.

static __inline void release_mem( CvPoint2D64f*, CvPoint2D64f*, static struct feature** );

this gave me error : storage class specified for parameter 'type name' so I changed the code to (Trial and error rather than any logic)

static __inline void release_mem( CvPoint2D64f*, CvPoint2D64f*, struct feature** );

Thank you in advance.

+1  A: 

It is a side-by-side configuration problem. Your program contains a manifest that states what DLL it needs from the SxS cache. And Windows can't find it. Start by looking at the Windows event log, it will tell you what DLL couldn't be found.

This is more typically a VS2008 problem, its DLL version of the CRT libraries are stored in the side-by-side cache. Like msvcrt90.dll. Maybe you didn't quite manage to get the code converted to your new build environment. Which is odd, embedding the manifest is an explicit build step. Do check that you don't have a .manifest file in your build directory.

This hoopla got retired in VS2010 btw. VS2010 Express could be your 3rd attempt.

Hans Passant
Thanks,I do not have .manifest file in by NB project build directory. I only copied c files and header files from my VS project.
Niroshan
So, what did the event log say?
Hans Passant
Sorry for the delay,There is no entry related to this application.(Control Panel>Administrative Tools>Event Viewer I hope this is the correct place to look)
Niroshan
This error always produces an event log entry. Well, I'm stuck helping you. You mistyped the error code, Google "0xc0150002" to look for help elsewhere. Good luck.
Hans Passant
hmm interesting.. I double checked there is no entry that matches the date and time. The last event log entry was this: "wuauclt (448) The database engine stopped." But its event time is few minutes earlier than the time I ran the program.Anyway thanks for trying
Niroshan