Using emscripten with c++, trying to bind a simple class which has a static function and nothing else. Examples I've seen in the official docs and other places is very straightforward. So I don't get why this doesn't work:
EMSCRIPTEN_BINDINGS(LLWI_COLLECTION){
emscripten::class_<LLWI>("LLWI")
.class_function("prepare", &LLWI::prepare)
;
}
Intellisense gives the error: no instance of constructor "emscripten::class_<ClassType, BaseSpecifier>::class_ [with ClassType=LLWI, BaseSpecifier=emscripten::internal::NoBaseClass]" matches the argument list -- argument types are: (const char [5])
Which means this is not a valid constructor for class_ but, I went through bind.h, I've found the constructor and there shouldn't be any problem, it does take a const char* as an argument. And frankly, I don't understand how this doesn't work, every example I look at, is the same thing that I've done.
Btw, even though intellisense gives an error, emcc compiles without problem. But in the browser I get the error: wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
And Module.LLWI.prepare() is undefined when I try to call it from the console.