I am trying to convert classes (and structs) from C++ to Javascript using Emscripten. For this I want to use Embind. I am trying to convert a very simple example but even with this example I am getting an error. My Code:
#include "C:\\Emscripten\\emscripten\\1.30.0\\system\\include\\emscripten\\bind.h"
using namespace emscripten;
class AddTest
{
public:
static unsigned int addTest(unsigned int stepCount);
};
EMSCRIPTEN_BINDINGS(AddTest)
{
class_<AddTest>("AddTest")
.constructor<>()
.class_function("addTest", &AddTest::addTest)
;
}
With this code, it gets me an error:
"Error: no instance of constructor "class_BaseSpecifier::class_[with ClassType=AddTest, >BaseSpecifier=internal::NoBaseClass]" matches the argument list
An example for using Embind is given here: http://ift.tt/1JYHsrD
I am just not able to spot the difference between the example and my code.
Can somebody help me?
Aucun commentaire:
Enregistrer un commentaire