I'm looking for a way to extend (i.e. add new members to a type using the %extend directive) a type that is defined in the library file itself while the header files of the library provide only a forward declaration for the type.
Treating the type as if its definition is known at compile time, leads to the following warning:
Warning 303: %extend defined for an undeclared class [name of the type].
Is anyone aware of a solution or a workaround for this problem? I'm sure there is one, since SWIG's documentation states that swig assumes that the unknown type is a struct or a union each time it finds one.
Many thanks in advance!