I am binding a class to squirrel and I have come across a problem I don't know how to resolve. The class has a function which takes another class as an argument. When I choose not to bind that specific function it compiles, but when I do it throws an error.
Classes:
class A
{
public:
A(int foo) : m_foo(foo) {}
private:
int m_foo;
}
class B
{
public:
void bar(A foo) { /* Do Stuff with foo */ }
}
Bindings
Sqrat::RootTable().Bind("A", Sqrat::Class<A>());
Sqrat::RootTable().Bind("B", Sqrat::Class<B>())
.Func("bar", &B::bar);
);
The class that is used as an argument has already been bound to squirrel with Sqrat with no problems however it seems Sqrat still can't recognise what type it is. Any ideas as to why this is occurring?