最近看了下用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 © 力為