Hi there,
I have cocos2d-x-2.1.4 tag and binding_generator master, which uses llvm3.3.
I’m running on ubuntu 12 and having trouble of generating the jsbinding files.
The generated cpp files cause massive compile error.
- cocos2d::CCObject is rendered as coco2d::Object, which is undefined
- When marshaling arguments and return value, instead of calling jsval_to_* that defined in ScriptingCore, it is doing something like
if (!argv[1].isObject()) { ok = JS_FALSE; break; }
js_proxy_t proxy;
JSObjecttmpObj = JSVAL_TO_OBJECT(argv[1]);
proxy = jsb_get_js_proxy(tmpObj);
arg1 = (cocos2d::CCRect)(proxy ? proxy->ptr : NULL); // this cast is invalid
JSB_PRECONDITION2( arg1, cx, JS_FALSE, “Invalid Native Object”);
I’m building it on windows maybe this is the problem? Is it OK to generate the jsbindings on linux and use it on windows?
Any help is appreciated. Thanks