How to use auto-generated for global variable and method

I want use global variable and global method in lua.But there is nothing in auto-generated cpp.can someone help me? thanks!