On Thursday, 3 December 2020 at 00:30:06 UTC, Kyle Ingraham wrote:
// EDSDKTypes.h
typedef struct __EdsObject* EdsBaseRef;
typedef EdsBaseRef EdsCameraListRef;
//
[...]
// edsdk.d
struct EdsBaseRef;
alias EdsBaseRef EdsCameraListRef;
You've dropped a level of indirection here. In the C header,
EdsBaseRef is a pointer, but in your D code, it is an opaque
struct.
The correct way to translate these C declarations into D is:
struct __EdsObject;
alias EdsBaseRef = __EdsObject*;
alias EdsCameraListRef = EdsBaseRef;
Note that unlike C, D does not allow us to refer to an incomplete
type without first declaring it.