From 145943068f7e59f798c2648704275e0fcebef403 Mon Sep 17 00:00:00 2001 From: XiaoFeng Date: Wed, 25 Nov 2015 22:35:02 +0800 Subject: [PATCH] Add missing function export --- cocos/scripting/js-bindings/manual/ScriptingCore.h | 3 ++- cocos/scripting/js-bindings/manual/js_manual_conversions.h | 7 ++++--- cocos/scripting/lua-bindings/manual/LuaBasicConversions.h | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cocos/scripting/js-bindings/manual/ScriptingCore.h b/cocos/scripting/js-bindings/manual/ScriptingCore.h index 5f472a8f45..9219a0bc4e 100644 --- a/cocos/scripting/js-bindings/manual/ScriptingCore.h +++ b/cocos/scripting/js-bindings/manual/ScriptingCore.h @@ -35,6 +35,7 @@ #include "spidermonkey_specifics.h" #include "js_manual_conversions.h" #include "mozilla/Maybe.h" +#include "js-BindingsExport.h" #include #include @@ -75,7 +76,7 @@ public: * - Invoke garbage collection of JavaScript context * - etc... */ -class ScriptingCore : public cocos2d::ScriptEngineProtocol +class CC_JS_DLL ScriptingCore : public cocos2d::ScriptEngineProtocol { private: JSRuntime *_rt; diff --git a/cocos/scripting/js-bindings/manual/js_manual_conversions.h b/cocos/scripting/js-bindings/manual/js_manual_conversions.h index cd60c4d62c..29f38f393e 100644 --- a/cocos/scripting/js-bindings/manual/js_manual_conversions.h +++ b/cocos/scripting/js-bindings/manual/js_manual_conversions.h @@ -31,6 +31,7 @@ #include "js_bindings_config.h" #include "cocos2d.h" #include "spidermonkey_specifics.h" +#include "js-BindingsExport.h" #define JSB_COMPATIBLE_WITH_COCOS2D_HTML5_BASIC_TYPES @@ -98,7 +99,7 @@ bool jsval_to_uint16( JSContext *cx, JS::HandleValue vp, uint16_t *ret ); bool jsval_to_long( JSContext *cx, JS::HandleValue vp, long *out); bool jsval_to_ulong( JSContext *cx, JS::HandleValue vp, unsigned long *out); bool jsval_to_long_long(JSContext *cx, JS::HandleValue v, long long* ret); -bool jsval_to_std_string(JSContext *cx, JS::HandleValue v, std::string* ret); +CC_JS_DLL bool jsval_to_std_string(JSContext *cx, JS::HandleValue v, std::string* ret); bool jsval_to_ccpoint(JSContext *cx, JS::HandleValue v, cocos2d::Point* ret); bool jsval_to_ccrect(JSContext *cx, JS::HandleValue v, cocos2d::Rect* ret); bool jsval_to_ccsize(JSContext *cx, JS::HandleValue v, cocos2d::Size* ret); @@ -117,7 +118,7 @@ bool jsval_to_ray(JSContext *cx, JS::HandleValue vp, cocos2d::Ray* ret); bool jsval_to_resoucedata(JSContext *cx, JS::HandleValue v, cocos2d::ResouceData* ret); // forward declaration -js_proxy_t* jsb_get_js_proxy(JSObject* jsObj); +CC_JS_DLL js_proxy_t* jsb_get_js_proxy(JSObject* jsObj); template bool jsvals_variadic_to_ccvector( JSContext *cx, /*jsval *vp, int argc,*/const JS::CallArgs& args, cocos2d::Vector* ret) @@ -184,7 +185,7 @@ bool jsval_to_ccvaluemap(JSContext* cx, JS::HandleValue v, cocos2d::ValueMap* re bool jsval_to_ccvaluemapintkey(JSContext* cx, JS::HandleValue v, cocos2d::ValueMapIntKey* ret); bool jsval_to_ccvaluevector(JSContext* cx, JS::HandleValue v, cocos2d::ValueVector* ret); bool jsval_to_ssize( JSContext *cx, JS::HandleValue vp, ssize_t* ret); -bool jsval_to_std_vector_string( JSContext *cx, JS::HandleValue vp, std::vector* ret); +CC_JS_DLL bool jsval_to_std_vector_string( JSContext *cx, JS::HandleValue vp, std::vector* ret); bool jsval_to_std_vector_int( JSContext *cx, JS::HandleValue vp, std::vector* ret); bool jsval_to_std_vector_float( JSContext *cx, JS::HandleValue vp, std::vector* ret); bool jsval_to_matrix(JSContext *cx, JS::HandleValue vp, cocos2d::Mat4* ret); diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h index cf46e70d6f..f9679d3a13 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h @@ -30,6 +30,7 @@ extern "C" { } #include "tolua_fix.h" #include "cocos2d.h" +#include "Lua-BindingsExport.h" using namespace cocos2d; @@ -145,7 +146,7 @@ extern bool luaval_to_uint16(lua_State* L,int lo,uint16_t* outValue, const char* * @param funcName the name of calling function, it is used for error output in the debug model. * @return Return true if the value at the given accpetable index of stack is a number or a string convertible to a number, otherwise return false. */ -extern bool luaval_to_boolean(lua_State* L,int lo,bool* outValue, const char* funcName = ""); +extern CC_LUA_DLL bool luaval_to_boolean(lua_State* L,int lo,bool* outValue, const char* funcName = ""); /** * Get a double value from the given accpetable index of stack. @@ -181,7 +182,7 @@ extern bool luaval_to_long_long(lua_State* L,int lo,long long* outValue, const c * @param funcName the name of calling function, it is used for error output in the debug model. * @return Return true if the value at the given acceptable index of stack is a string or a number convertible to a string, otherwise return false. */ -extern bool luaval_to_std_string(lua_State* L, int lo, std::string* outValue, const char* funcName = ""); +extern CC_LUA_DLL bool luaval_to_std_string(lua_State* L, int lo, std::string* outValue, const char* funcName = ""); /** * Get a long value from the given accpetable index of stack. @@ -569,7 +570,7 @@ bool luaval_to_ccvector(lua_State* L, int lo , cocos2d::Vector* ret, const ch * @param funcName the name of calling function, it is used for error output in the debug model. * @return Return true if the value at the given accpetable index of stack is a table, otherwise return false. */ -bool luaval_to_std_vector_string(lua_State* L, int lo, std::vector* ret, const char* funcName = ""); +CC_LUA_DLL bool luaval_to_std_vector_string(lua_State* L, int lo, std::vector* ret, const char* funcName = ""); /** * Get a pointer points to a std::vector from a Lua array table in the stack.