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
publicunsafepartialclassHeader1{// ... internal stuffpublicconstintMAX_NUMBER=37;}publicunsafepartialclassHeader2{// ... internal stuffpublicconstintsomeNumber= MAX_NUMBER;// compile error. Should be Header1.MaxNumber, obviously.}
How does one go about solving this issue?
Also is it possible to tell CppSharp to only generate data declarations without all the interop/internal code? I just want to convert POD structs and enums from C/C++ to their equivalent in C#.
The text was updated successfully, but these errors were encountered:
Ideally we would migrate the native parser out of AST::ExpressionObsolete for variable initializers, which has the name suggests is the old obsolete expression representation for expressions, and would use AST::Expr instead via https://github.com/mono/CppSharp/blob/main/src/CppParser/ParseExpr.cpp#L16.
I am not sure the exactly code path that is being taken here in that code, but it could be modified to just evaluate this down to 37 directly in the native code, so no reference to Header1 is needed in generation.
Trying to generate code for two headers:
And
The generated code is
How does one go about solving this issue?
Also is it possible to tell CppSharp to only generate data declarations without all the interop/internal code? I just want to convert POD structs and enums from C/C++ to their equivalent in C#.
The text was updated successfully, but these errors were encountered: