Click here to Skip to main content
13,201,763 members (68,805 online)
Rate this:
Please Sign up or sign in to vote.
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
Posted 27-Jul-12 22:26pm
Updated 28-Jul-12 4:50am
Wes Aday104.2K
Wes Aday 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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You should have a look at the Emgu CV library which basically already does what you need:[^]
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171020.1 | Last Updated 28 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100