Click here to Skip to main content
15,667,577 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to convert the opencv (c /c++) program into a dll file. I want to use that dll in c# windows form Application.
I tried some methods which is given by some sites but while adding the references in window forms applications I got an error.

This is my program

#include "stdafx.h"
#include "cv.h"

#include "highgui.h"
#include <stdio.h>

void  main(const char*filename)
if  (filename ==0)
        printf("The image not loaded\n");
        return -1;
    IplImage* input_im = 0;
    input_im = cvLoadImage(filename);


When i complied this program its compile within not errors. But When i strated to debugging it shows error as follow error - Unable to start program 'c:\users\my\destop\cam\estlib.dill

I don't know where made a mistake.Please help me
Thank you
Updated 28-Jul-12 4:50am
[no name] 28-Jul-12 10:52am    
Sounds more like you have your DLL project set as the startup project since you can't run a DLL.

1 solution

You should have a look at the Emgu CV library which basically already does what you need:[^]
Share this answer
sampathbc123 28-Jul-12 10:46am    
Thank u for ur comment.But I want to convert the opencv (c /c++) program into a dll file .help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900