这是我在网上找到的步骤:
1、将Cocos2dxGAFPlayer文件夹拷贝至cocos/external文件夹下
2、将打开Player.sln,添加现有项目,将Libray\GAFPlayer工程和lua_bindings\proj.win32\libGAFLuaBinding工程添加进来
3、Player工程属性里添加上面两个工程的引用
4、修改AppDelegate.cpp:
声明部分添加以下几行:
#include “GAF.h”
#include “lua_gaf.hpp”
#include “lua_gaf_main.hpp”
USING_NS_GAF;
找到 quick_module_register 方法,里面添加两行:
register_all_gaf(L);
append_gaf_scripts(L);
我按照这个步骤做的时候,下载的是GAF5, 声明部分的几行识别不了,而且添加了引用以后就编译出错
这个是只添加引用出的错误:
错误 1 error C1083: 无法打开包括文件: “cocos2d.h”: No such file or directory
错误 2 error C1083: 无法打开包括文件: “base/ccConfig.h”: No such file or directory (…\bindings\lua_gaf.cpp)
错误 3 error C1083: 无法打开包括文件: “base/ccConfig.h”: No such file or directory (…\bindings\lua_gaf_main.cpp)
错误 4 error LNK1104: 无法打开文件“C:\work\VSproject\daziGame\proj.win32\Debug\GAFPlayer.lib”
望大神能解决。可提供报酬。谢谢了 可加我qq 345963835