← Back to team overview

yade-dev team mailing list archive

Re: Exposing SpherePadder to python

 

(sorry for the private mail, again...)
I found some tutorial on boost::python on the web, but I'm not clear
with the compilation procedure (and I would like to avoid bjam).
Could you please enlighten me about this procedure? Maybe you've got
somewhere on your laptop a small example (?)
Easy. You just need to link with boost_python library and the shared object should be called something.so (not libsomething.so): g++ src1.cpp src2.cpp -shared -o something.so -lboost_python -lCGAL ... In scons (gui/SConscript) this boild down to


env.SharedLibrary('SpherePadder',['SpherePadder/SpherePadder.cpp','SpherePadder/SomethingElse.cpp'],SHLIBPREFIX='',LIBS=env['LIBS']+['boost_python','CGAL'])

(In yade, boost_python (which can also be boost_python-mt on some archs) is already in env['LIBS'].)

If you want, I could make scons detect CGAL (in SConstruct) and if it is found, build SpherePadder in extra as well.

Vaclav
OK, I think I will wrap the accessor functions.
If they are not too many, that should work just fine.

V




References