Interfacing with C++
infinityplusb
brian at infinityplusb.com
Sun Feb 4 10:42:22 UTC 2018
On Sunday, 4 February 2018 at 08:33:20 UTC, Mike Parker wrote:
> On Sunday, 4 February 2018 at 08:17:31 UTC, Mike Parker wrote:
>
> Assuming this is OpenCV ...
it is, everyone keeps saying writing bindings in D is super easy
...
I feel this is a slight simplification. :(
> version(Windows)
> extern(C) alias CvCmpFunc = int function(const(void)*,
> const(void)*, void*);
> else
> extern(C++) alias CvCmpFunc = int function(const(void)*,
> const(void)*, void*);
Sounds easy enough.
> Though, I'm curious why anyone would want to declare a callback
> in a C++ program as cdecl only on Windows and use the default
> C++ convention everywhere else. I suggest you dig into it and
> make sure that's what's intended.
> And good luck binding to OpenCV!
Thanks, I feel I'm going to need it ...
More information about the Digitalmars-d-learn
mailing list