emscripten-core / emscripten-core/emscripten
pb duplicate interface between idl file and wrapper
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Hi , i would need some help.
I have binded this c++ code :
```
struct btOverlapFilterCallback
{
virtual ~btOverlapFilterCallback()
{}
// return true when pairs need collision
virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0;
};
struct InterfaceWrapper : public emscripten::wrapper {
EMSCRIPTEN_WRAPPER(InterfaceWrapper);
bool needBroadphaseCollision(btBroadphaseProxy *proxy0,btBroadphaseProxy *proxy1) {
return call("needBroadphaseCollision",proxy0,proxy1 );
}
};
EMSCRIPTEN_BINDINGS(interface) {
emscripten::class_("btOverlapFilterCallback")
.function("needBroadphaseCollision", &btOverlapFilterCallback::needBroadphaseCollision, emscripten::allow_raw_pointers(),emscripten::pure_virtual())
.allow_subclass("InterfaceWrapper")
;
}
```
I managed doing it with c++ wrapper, but since btOverlapFilterCallback is too defined as interface in IDL file, I have this mistake message :
name: "BindingError", message: "Cannot register public name 'btOverlapFilterCallback' twice",
how to avoid this ? Or is it possible to wrap the btOverlapFilterCallback virtual func in the IDL file directly?
Contributor guide
Assessment
This issue has not been assessed yet.