Compile and link C/C++ libs automatically

Robert M. Münch robert.muench at saphirion.com
Sat Dec 5 09:53:29 UTC 2020


On 3 Dec 2020 at 13:38:58 CET, "bachmeier" <no at spam.net> wrote:

> I assume you're referring to cgo.

Correct, it's a separate component but which mostly gets out of your way.

>  I honestly don't see how that's any easier than using dpp.

The tooling will use it in the background, you don't have to call it
explicitly.

> My recollection is that I gave up after a 
> painful attempt trying to pass function pointers. Some 
> limitations are listed here: https://golang.org/cmd/cgo/ For 
> instance, "Go struct types are not supported; use a C struct 
> type. Go array types are not supported; use a C pointer."

I don't see this as an limitation. That's what you have to deal with when you
cross the chasm.

However, crossing the chasm needs to be simple and that's what it is.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster




More information about the Digitalmars-d mailing list