<div>Boost Version: 1.33.1</div>
<div>Compiler: VC7.1</div>
<div>OS: windows2000 sp4</div>
<div> </div>
<div>when i write a c++ function:</div>
<div>void Foo(std::wstring str)<br>{<br> wcout<<str<<endl;<br>}</div>
<div> </div>
<div>then,called by the python script:</div>
<div>#python script</div>
<div>#dxui is my own defined module</div>
<div>import dxui</div>
<div> </div>
<div>def Bar():<br> dxui.Foo(u"hello world")</div>
<div> </div>
<div>at last,i called the 'Bar' function in my C++ code.</div>
<div> </div>
<div>///.....</div>
<div>
<p> try{</p>
<p> logicNamespace["Bar"]();<br> }catch(...)<br> {<br> if(PyErr_Occurred())<br> {<br> PyErr_Print();<br> }<br> }</p></div>
<div>///....</div>
<div> </div>
<div>the following is the error:</div>
<div> </div>
<div>Traceback (most recent call last):<br> File "e:\work\TestUnicode\ui.py", line 5, in Bar<br> dxui.Foo(u"hello world")<br>Boost.Python.ArgumentError: Python argument types in<br> dxui.Foo(unicode)
<br>did not match C++ signature:<br> Foo(class std::basic_string<unsigned short,struct std::char_traits<unsigned<br>short>,class std::allocator<unsigned short> >)</div>
<div> </div>
<div>but in the 'initialize_builtin_converters'(builtin_converters.cpp) function,i called.</div>
<div> </div>
<div># ifndef BOOST_NO_STD_WSTRING<br> // Register by-value converters to std::string, std::wstring<br> slot_rvalue_from_python<std::wstring, wstring_rvalue_from_python>();<br># endif</div>
<div> </div>
<div>yeah, in my platform ,it doesn't define the macro 'BOOST_NO_STD_WSTRING',</div>
<div>so what's wrong with it?</div>