0
嗨我创建了一个firebreath项目。添加此方法到默认生成的代码:Firebreath MethodConverter.h无效初始化
在应用程序API头文件(MYAppAPI.h):
FB_JSAPI_EVENT(bgp, 3, (const FB::variant&, bool, int));
std::string bgp(std::string& val);
在应用程序API的源文件(MAppAPI.mm我使用目标c) :
registerMethod("bgp", make_method(this, &MyAppAPI::bgp));
std::string MyAppAPI::bgp(std::string& val){...}
但是当我建立的代码,我收到此错误:
... firebreath/src目录/ ScriptingCore/MethodConverter.h:115:错误:非const refe的无效初始化类型'std :: string &'的类型'std :: basic_string,std :: allocator'的临时类型'
任何想法?