i have used v8 inside a class. Createcontext method is also inside a wrapper class. when i try to set global and map it to print function which is also inside the same class, i am getting error invalid use of non-static member function
the line i used to set the method is
global->Set(v8::String::NewFromUtf8(isolate,"print"), v8::FunctionTemplate::New(isolate,this -> print));
can someone please explain me why this error happens and how to resolve it
The function you pass to FunctionTemplate::New must be static. Hence try making the print function inside your class static.