emscripten-core / emscripten-core/emscripten

pb duplicate interface between idl file and wrapper

Open
#13,496 1 comment 0 reactions 0 assignees View on GitHub
wontfix
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.