[C++-sig] Boost.Python and STLPort, ArgumentError
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
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_stringstlpd_std::char_traits,class stlpd_std::allocator >)
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
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Re: [C++-sig] Boost.Python and STLPort, ArgumentError
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
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_stringstlpd_std::char_traits,class stlpd_std::allocator >)
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
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Re: [C++-sig] Boost.Python and STLPort, ArgumentError
Hello Nikolay,
Thanks for the reply.
I _think_ it is built with stlport. I rebuilt boost.python with my
user-config.jam changed and the stdlib=stlport option. It generated new
libraries with the 'p' suffix (for stlport)
When I bjammed my c++ extension module, I had to link to the
boost_python-xxx-gdp.lib files and it required the dll counterparts to
build and run
Perhaps I need to build my project with:
bjam define=__STL_DEBUG stdlib=stlport
I will try on the train home :)
Thanks
Simon
Nikolay Mladenov wrote:
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
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,class
stlpd_std::allocator >)
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
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig
___
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig
Re: [C++-sig] pygccxml and multidimensional arrays
Yes, your patch corrected the problem. Is the next official release scheduled? Thanks, Josh -Original Message- From: [email protected] [mailto:[email protected]] On Behalf Of Roman Yakovenko Sent: Tuesday, May 19, 2009 4:34 AM To: Development of Python/C++ integration Subject: Re: [C++-sig] pygccxml and multidimensional arrays On Thu, Apr 23, 2009 at 9:23 PM, Roman Yakovenko wrote: > On Thu, Apr 23, 2009 at 9:21 PM, Roman Yakovenko > wrote: >> On Thu, Apr 23, 2009 at 8:17 PM, Davidson, Josh >> wrote: >>> I'm using information provided by pygccxml to generate Construct objects >>> (http://construct.wikispaces.com/) that are capable of reading and >>> writing to data structures stored in shared memory. Right now, I just >>> manually reverse the indices any time I detect an array type before I >>> generate a Construct. >> >> Okey. > > Sorry, I forgot to add, can you open bug on SourceForge project page? Josh, I think the bug is fixed now: http://pygccxml.svn.sourceforge.net/viewvc/pygccxml?view=rev&revision=1735 Can you verify this? Thanks -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ ___ Cplusplus-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/cplusplus-sig ___ Cplusplus-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/cplusplus-sig
