Hi folks! When trying to run Python-wrapped C++ code, I receive the following message (this was a simple call to one of the c'tors of class TextFile): Traceback (most recent call last): File "./FileTest.py", line 5, in <module> t_out = TextFile("sample.txt", "This is some sample text. It says:\n\nHello world!") Boost.Python.ArgumentError: Python argument types in TextFile.__init__(TextFile, str, str) did not match C++ signature: __init__(_object*, std::string filename, dretchy::io::DeviceDataType type, std::string content, dretchy::io::CompressionType zipper) __init__(_object*, std::string filename, dretchy::io::DeviceDataType type, dretchy::io::CompressionType zipper) __init__(_object*, std::string filename, dretchy::io::DeviceDataType type, std::string content) __init__(_object*, std::string filename, dretchy::io::DeviceDataType type) __init__(_object*, std::string filename, std::string content, dretchy::io::CompressionType zipper) __init__(_object*, std::string filename, dretchy::io::CompressionType zipper) __init__(_object*, std::string filename, std::string content) __init__(_object*, std::string filename) Strangely enough, this only happens when doing so on my openSuSE 11.0 machine. If I try the same thing on my Ubuntu 9.10 notebook, it works perfectly. What could be the source of this problem? The code is a bit lengthy, so I attached the non-compilable headers only. Personally, I presume the error is rooted in the C-string / C++ std::string conversion. The Python wrapping itself was done via Py++, the boost libs in use are of version 1.41.0. Thanks a lot and best regards, Oliver
participants (1)
-
Oliver Rudolph