Boost.Python.ArgumentError
我最近在学习python,调用函数时出现了这个错误,希望有人能帮我。 在C++中: 在python中:Boost.Python.ArgumentError,python,c++,boost,Python,C++,Boost,我最近在学习python,调用函数时出现了这个错误,希望有人能帮我。 在C++中: 在python中: class keywords(Structure): _fields_ = [('words', c_char *10),] class outStruct(Structure): _fields_ = [('kws', POINTER(keywords)), ('len', c_int),] test(byref(o)) 错误: ArgumentError:
class keywords(Structure):
_fields_ = [('words', c_char *10),]
class outStruct(Structure):
_fields_ = [('kws', POINTER(keywords)), ('len', c_int),]
test(byref(o))
错误:
ArgumentError:中的Python参数类型
您好,test(您好,CargoObject)
类外部结构(结构):字段=[('kws',指针(关键字)),('len',c_int),] 我在谷歌上搜索了几个小时,没有找到任何好的解决办法。 我想用python获取结构。
感谢您的帮助。不要将boost.python和ctypes混用。用boost.python包装您的C结构。
class keywords(Structure):
_fields_ = [('words', c_char *10),]
class outStruct(Structure):
_fields_ = [('kws', POINTER(keywords)), ('len', c_int),]
test(byref(o))