www.digitalmars.com         C & C++   DMDScript  

D - OpenCV in D??

reply qadosh <qadosh gmail.com> writes:
Hi!
I'm work in image processing with OpenCV library on C++. Can i use
this library on D??
Thanks!
Nov 03 2009
parent reply "Edward Brekelbaum" <nedbrek yahoo.com> writes:
Hello,

"qadosh" <qadosh gmail.com> wrote in message 
news:hcppq3$dle$1 digitalmars.com...
 Hi!
 I'm work in image processing with OpenCV library on C++. Can i use
 this library on D??
 Thanks!

The D group is now obsolete. You should ask your question in digitalmars.D.learn. In general, C++ is not usable from D (or anything else, that is the problem). You can define C functions (extern "C") for some functionality, and D can link to C. Hope that helps, Ned
Nov 03 2009
parent reply Ben <b.manashirov utoronto.ca> writes:
How can I link to C libraries? I'm having trouble finding those resources.


BTW: OpenCV is a C library.
Jun 15 2010
parent Robert Clipsham <robert octarineparrot.com> writes:
On 16/06/10 04:02, Ben wrote:
 How can I link to C libraries? I'm having trouble finding those resources.


 BTW: OpenCV is a C library.

See: http://digitalmars.com/d/2.0/htomodule.html It's a simple case of converting the C headers to D modules, then linking in the library with the -l switch. You should also take a look at http://www.dsource.org/projects/bcd which can automate the process for you.
Jun 16 2010