You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
discard"forward decl of FooImpl"typeFoo*=ptrFooImpl
However, instead c2nim outputs:
typeFoo*=ptrFooImpl
If you attempt to import foo, Nim will complain about FooImpl not being declared.
One can get around this via forward declaring on a separate line in the header file, i.e. the C header should look as follows:
structFooImpl;
typedefstructFooImpl*Foo;
The text was updated successfully, but these errors were encountered:
miguelmartin75
changed the title
Implicit Forward Declared Struct in Header
Implicit Forward Declared Struct in Header incorrectly Converted
Dec 17, 2023
miguelmartin75
changed the title
Implicit Forward Declared Struct in Header incorrectly Converted
Implicit Forward Declared Struct incorrectly Converted
Dec 17, 2023
For example:
foo.h
:Should output
However, instead
c2nim
outputs:If you attempt to
import foo
, Nim will complain aboutFooImpl
not being declared.One can get around this via forward declaring on a separate line in the header file, i.e. the C header should look as follows:
The text was updated successfully, but these errors were encountered: