最近看了下用Boost.Python封装C++供Python调用。在捣鼓的过程中遇到一个费解的异常:TypeError: unbound method Boost.Python.function object must be called with MyClass instance as first argument (got nothing instead)最终尽管可以正常使用了,但仍是一头雾水。前期工作1. 用Python封装C++类Vector3:
2. 用Python调用构造一个Vector3对象,测试其功能
Powered by: C++博客 Copyright © 力为