The code you show as being in class1_lua.h should be in a CPP file.
The contents of my generated toLua header:
------------------------------------------------------------------------
--
/*
** Lua binding: gameplay
** Generated automatically by tolua++-1.0.92.
*/
/* Exported function */
TOLUA_API int tolua_gameplay_open (lua_State* tolua_S);
------------------------------------------------------------------------
--
That's it. The rest of the generated code goes in the CPP. Perhaps
you're misusing the command line params? My command line (all one line,
its just long):
tolua++ -o lua_gameplay_methods_generated.cpp -n gameplay -H
lua_gameplay_methods_generated.h lua_gameplay_methods.pkg
-Andrew Yount