[cocos2dx-JSB篇]Undefined symbols for architecture i386: "_jsb_Object_prototype", referenced from

文章撰寫日期︰2013/09/17 17:24
cocos2dx使用版本︰v 3.0 alpha 0

一、問題

今天在產生JSB-Binding檔時,遇到
Undefined symbols for architecture i386: "_jsb_Object_prototype", referenced from ...
的問題。

二、解決辦法

將binding-generator產生岀3個檔中的autoxxxxbindings.cpp(如autogensimpletestbindings.cpp)檔,
jsb_Object_prototype物件給予預設NULL初始值即可解決。

原來binding-generator產生岀來的code是
extern JSObject *jsb_Object_prototype;
改成
extern JSObject *jsb_Object_prototype = NULL;
即可。

關鍵字︰
Undefined symbols for architecture i386: _jsb_Object_prototype
Undefined symbols for architecture i386: _jsb_CCObject_prototype

沒有留言 :

張貼留言