Is there a way to use a C header that contains a struct
declaration but no definition?
For example, the C header may contain:
typedef struct some_type_s some_type;
Which is only fully defined in the implementing C file:
struct some_type_s { ... };
I am trying to wrap the header in D:
extern(C)
{
struct some_type_s;
alias some_type = some_type_s;
}
And then use it in another D file:
some_type s;
But dmd does not know the size of the struct so it can't compile.
Is there a work around to this other than moving the struct
definition into the C header file?