extern extension limitations

About Monkey 2 Forums Monkey 2 Development extern extension limitations

This topic contains 0 replies, has 1 voice, and was last updated by  abakobo 1 month ago.

Viewing 1 post (of 1 total)
  • Author
  • #13672


    I’ve been using extern extension for a vec2 struct and got all the operators working and it’s amazing how it’s easy to mix Vec2f and b2Vec2 now! But..

    I now have a class that has it’s destructor and constructor set as private and creating an extension for this external class will generate a gcc error. It has no “simple” constructor which is a problem too.
    I’ve been able to get the class working with a mx2 Extension but I had to modify the following in the c++ files:
    -Constructors and destructor must be public (or I’ll get a gcc error ” note: declared private here”)
    -The Class must have a constructor with no argument (Foo(); in .h and Foo::Foo() in .cpp) or it’ll send an error too “note: candidate expects 1 argument, 0 provided”.

    Should I post an issue or is it beyond mx2’s scope (and I should therefore modify the native code?)

    I joined a little example code to comment/uncomment the “private” keyword and comment/uncomment the “simple” constructor.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.