"This type must be class definition for: ..." error when enabling EMBIND_AOT
#22862
Unanswered
martijnthe
asked this question in
Q&A
Replies: 2 comments
-
Can you provide more of your bindings or ideally a minimal reproducer? I tried this below and it seems to work fine: #include <stdio.h>
#include <emscripten.h>
#include <emscripten/bind.h>
using namespace emscripten;
struct Foo {
int i = 42;
};
int foo(const Foo& foo) {
return foo.i;
}
int main() {
EM_ASM(
let foo = new Module.Foo();
console.log(foo.foo());
);
printf("done\n");
}
EMSCRIPTEN_BINDINGS(xxx) {
class_<Foo>("Foo")
.constructor()
.function("foo", &foo);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm trying to enable
EMBIND_AOT
&DYNAMIC_EXECUTION=0
.Without those flags, the project builds fine, but with them I get this confusing error:
Does anyone know what this means or what I could be doing wrong?
In my .cpp code I have something like this:
Beta Was this translation helpful? Give feedback.
All reactions