I'm trying out angelscript for an embedded (ARM linux) project, and having some issues with the class method bindings.
I'm using the tutorial project and added a HelloWorld class to test out bindings. I added the following lines and everything seemed to compile fine.
engine->RegisterObjectType("HelloWorld", sizeof(HelloWorld), asOBJ_CLASS);
engine->RegisterObjectProperty("HelloWorld", "int value", offsetof(HelloWorld, value));
engine->RegisterObjectMethod("HelloWorld", "void Print()", asMETHOD(HelloWorld, Print), asCALL_THISCALL);
Here's the class header just in case
#ifndef _HELLOWORLD_H_
#define _HELLOWORLD_H_
class HelloWorld
{
public:
void Print ();
int value;
};
#endif // _HELLOWORLD_H_
But when I run the executable without changing the original script.as I get the following error.
sh-2.03# ./rxpclient
(0, 0) : ERR : Invalid configuration
Build() failed
Press any key to quit.
If I remove the RegisterObjectMethod() line, everything runs fine and I have access to the 'value' property from the script. Any help would be appreciated.