   Why can't I use a class as a property in luabind?
  Well my problem is simple, I'm trying to use a class which I have defined in lua bind as a property for another class but it won't let me.Here is the class:class E_RENDER_TARGET_DESC{public:E_RENDER_TARGET_DESC(){window = NULL;left = 0;top = 0;right = 1;bottom = 1;}E_WINDOW*window;floatleft;floattop;floatright;floatbottom;};Here is where I define it:luabind::module(g_Lua)[    luabind::class_<E_RENDER_TARGET_DESC>("CreateRenderTargetDesc")   .def(luabind::constructor<>()).def_readwrite("window", &E_RENDER_TARGET_DESC::window).def_readwrite("left", &E_RENDER_TARGET_DESC::left).def_readwrite("top", &E_RENDER_TARGET_DESC::top).def_readwrite("right", &E_RENDER_TARGET_DESC::right).def_readwrite("bottom", &E_RENDER_TARGET_DESC::bottom)];Lua source:WindowDesc = CreateWindowDesc()WindowDesc.name = "Ether"WindowDesc.icon = "Ether.ico"WindowDesc.left = 0WindowDesc.top = 0WindowDesc.width = 1024WindowDesc.height = 768WindowDesc.close = trueWindowDesc.maximize = falseWindowDesc.minimize = trueWindowDesc.sizeable = falseGameWindow = CreateWindow( WindowDesc )RenderTargetDesc = CreateRenderTargetDesc()RenderTargetDesc.window = GameWindowRenderTargetDesc.left = 0RenderTargetDesc.top = 0RenderTargetDesc.right = 1RenderTargetDesc.bottom = 1RenderTarget = CreateRenderTarget( RenderTargetDesc )And lastly this is the error I receive from luabind:Quote:No matching overload found, candidates:void <unknown>(CreateRenderTargetDesc&,CreateWindow* const&)My guess is that I was suppose to define something in E_WINDOW which lets you use it as a property or something.   
  You appear not to be supplying both arguments to your CreateRenderTarget function.   ;Quote:Original post by sprite_houndYou appear not to be supplying both arguments to your CreateRenderTarget function.No actually I figured it out on my own, you have to create a get and set function and use ".property" to define it in luabind. Not sure why it works but it does and thats all that matters.   