Skip to content

Fix case when typedef references struct that is not yet declared #88

Closed
@kornilova203

Description

@kornilova203

Generating bindings for /usr/include/uv.h gives lots of errors and does not output Scala code:

Failed to get declaration for struct __fsid_t
Failed to get declaration for struct _IO_FILE
Failed to get declaration for struct __va_list_tag
...

The problem is that typedef for struct can be located above struct declaration:

typedef struct myStruct mystruct;

struct myStruct {
    int a;
};

So when TreeVisitor visits typedef it is unable to translate struct myStruct because type is not yet in TypeTranslator::aliasesMap

Metadata

Metadata

Assignees

Labels

bindgenBinding generatorbugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions