I’m trying to make a pice of code with c++. I’m runnting under Linux (Ubuntu 64bits). I can compile the c++ source, but then I don’t know how to import under python.
After compile I have the object file (.o). I need a lib like (.a) or (.so)?
There are some examples or tutorials on the net? I can’t find it.
You have to compile it to .so, and you have to provide some wrapper functions in a format that Python expects. You can either write these functions by hand, or you can use a tool such as SWIG or Panda’s interrogate to write them for you.
If this is your first experience integrating C++ code and Python code, you might do well to investigate SWIG.