编写pkg


class Zgame

{

   public:

static void test1();


}


生成lua用cpp, include zgame.h


然后zgame.h

声明

static void test1();



zgame.cpp

定义

void Zgame.test1()

{

***

}