Closed eduardodoria closed 2 years ago
How are you making the binding? Try using the following method if you are currently binding everything for a single usertype at once in the usertype constructor.
auto bindings = sol::new_usertype<MyThing>("MyThing");
// Add bindings to the usertype afterwards one at a time
bindings["MyMethod1"] = &MyThing::MyMethod1;
bindings["MyMethod2"] = &MyThing::MyMethod2;
bindings["MyMethod3"] = &MyThing::MyMethod3;
I used to use all in single new_usertype
call.
I will do more tests, but it seems to works now!
Thanks!
I am trying to build using MinGW-w64 11.2.0 (and other recent versions) but sometimes getting this error in one of bindings C++ source file:
cc1plus.exe: out of memory allocating 65536 bytes
Already tried compile with parameters like: -ftrack-macro-expansion=0, -Wa,-mbig-obj, -Os, -O1, -O2. Also tried to placing groups of bindings in multiple different C++ source files. Nothing works.