在OS X上编译tolua++

  1. 用brew安装lua:

    brew install lua

  2. 到官网下载tolua++:

    http://www.codenix.com/~tolua/

  3. 编译生成tolua++.a静态库:

    cd Downloads/tolua++-1.0.93/src/lib

    gcc -c *.c -I../../include

    ar rcsv libtolua++.a *.o

  4. 编译tolua++

    cd Downloads/tolua++-1.0.93/src/bin

    gcc tolua.c toluabind.c -I../../include -L../lib/ -ltolua++ -llua -o tolua++

  5. done

你可能感兴趣的:(在OS X上编译tolua++)