I need to use wstring in luabind.
I've read this isn't really possible but I thought it may be with LuaPlus.
But i'm having problems.
First, to be clear, here is an example of what I wish to do:
~C++~
void printString(wstring s)
{
//do something
}
int main(int argc, char *argv[])
{
lua_State* luaState = lua_open();
luaopen_base(luaState);
luaopen_string(luaState);
luaopen_wstring(luaState);
luabind::open(luaState);
luabind::module(luaState)
[
luabind::def("printString", printString)
];
luaL_dofile(luaState, "Script.lua");
luabind::call_function<void>(luaState, "Test");
}
~Lua~
function Test()
printString(L"Test string");
end
But i'll get an error like this when running that script:
no match for function call 'printString' with the parameters (wstring)
candidates are:
printString(custom [class std::basic_string<wchar_t,struct
std::char_traits<wchar_t>,class std::allocator<wchar_t> >])
I just don't know what to do from here.
I've searched through the code for luabind and LuaPlus for hours but I
can't find the problem.
Can anyone point me in the right direction?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
luabind-user mailing list
luabind-user@...
https://lists.sourceforge.net/lists/listinfo/luabind-user