nbind icon indicating copy to clipboard operation
nbind copied to clipboard

std::string support is broken

Open mmarczell-graphisoft opened this issue 3 years ago • 0 comments

This code

class SomeClass {
	public:
	std::string SomeString () {
		return "Hello";
	}
};

#include "nbind/nbind.h"

NBIND_CLASS(SomeClass) {
	method(SomeString);
}

and then invoking the method from JS fails at runtime with

Uncaught TypeError: Module.Pointer_stringify is not a function

Pointer_stringify was removed from the emscripten SDK and replaced with UTF8ToString.

mmarczell-graphisoft avatar Dec 21 '21 09:12 mmarczell-graphisoft