In my experience, TYPELIB files are not suitable for generating a static
library because they are too platform-specific: for efficiency,
information has been resolved for the particular platform, e.g.
1. The sizes of structs and offsets of fields are hard-coded.
2. There are no platform-dependent types like int and long int - these
have been resolved to int32, int64 etc.
Thus any library generated from TYPELIB would need different versions
for x86 and x86_64. Also, as a result of resolving types:
That isn't much of a problem. The libraries generally have to be built for each platform anyway, so I don't see much of a problem in also having to generate platform-specific bindings.
3. There are no alias types.
Yes, I forgot about that problem.