How to use SWIG to Wrap C++ for Python

Reference: https://blog.csdn.net/u014525760/article/details/80676065

After compiling with: 

swig -python -c++ example.i && python setup.py build_ext --inplace

three more files: example.py, _example.so, example_wrap.cxx will be generated. With these files in directory, you can now import them into python for future use. Among these files, .py and .so files are necessary for use. 

你可能感兴趣的:(How to use SWIG to Wrap C++ for Python)