[C++-sig] Boost.Python and STLPort, ArgumentError

Nikolay Mladenov nickm at sitius.com
Fri Jun 19 16:11:24 CEST 2009


It looks like your Boost.Python requires rebuild with stlport?
The error message comes from Boost.Python (function.cpp I think).
It seems to me that your module is build with stlport but boost_python 
is not.

HTH,

Nikolay


Simon Pickles wrote:
> Hello,
> 
> Configuration:
> WinXP SP3
> MSVC8
> Python 2.5.4
> Boost 1.38
> STLPort 5.2
> Bullet Physics (requires STLPort to avoid Alignment problems)
> 
> I need to use STLPort with my c++ extension modules, due to Bullet 
> Physics API.
> 
> I've managed to build STLPort, rebuilt boost (bjam stllib=stlport 
> stage), and rebuild my project (bjam define=__STL_DEBUG). My problem 
> starts when I run my python code. This calls c++ modules, and I get a 
> type mismatch:
> 
> E:\WorkingCopies\client\extended>python client.py
> Traceback (most recent call last):
>  File "client.py", line 232, in <module>
>    log.StartLogToFile("Log_Client.txt")
> Boost.Python.ArgumentError: Python argument types in
>    None.None(Logger, str)
> did not match C++ signature:
>    None(class Logger {lvalue}, class stlpd_std::basic_string<char,class 
> stlpd_std::char_traits<char>,class stlpd_std::allocator<char> >)
> 
> Clearly, the c++ module, built with stlport, is expecting an 
> stlp::string while the calling python code is providing a std::string 
> (eg a python string)
> 
> Please don't tell me I have to rebuild python using stlport? I have not 
> had much success building python from source in the past! :)
> 
> Is there a simpler remedy for this hopefully small hurdle?
> 
> Thank you for your help
> 
> Simon



More information about the Cplusplus-sig mailing list