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