I don't think you're missing anything. I don't often run into this
problem, maybe because libraries I've used tend to keep structs
private. When the problem does show up, I have resorted to using
`_pointer`, too.

At Tue, 14 Apr 2015 17:04:38 -0700 (PDT), Ian Johnson wrote:
> I'm trying to interface with libnauty to do some graph-isomorphism stuff. 
> I've 
> gone through the docs many times but haven't been able to find a way to 
> adequately write a certain struct type.
> 
> In nauty.h:820 there's an incomplete definition followed by a struct that 
> contains a pointer to it, then the completed definition pointing back to the 
> other struct:
> 
> struct optionstruct;
> 
> typedef struct
> {
>    ...
>    void (*init)(..., struct optionstruct*, ...);
>    ...
> } dispatchvec;
> 
> typedef struct optionstruct
> {
>    ...
>    dispatchvec *dispatch;
>    ...
> } optionblk;
> 
> If I try to write these two struct types with define-cstruct, then the 
> dispatchvec's usage of _optionstruct-pointer is an undefined identifier error.
> 
> I currently replaced this with _pointer to get it all to compile. That might 
> work. I'm just wondering if I missed something. Mutual recursion seems like 
> an 
> important feature.
> 
> -Ian
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email 
> to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to