Hi There,

I've come across what might be an unusual problem involving py++ generated boost python code that I was hoping someone might be able to help me with.

We're using py++ to create python bindings for two libraries, one third party (libA)  and the other in house (libB - which has a dependency on libA). The two libraries both define a class called 'Box2f' which is being exposed in both bindings. Before importing the bindings into python we set the dlopen flags to be 'RTLD_GLOBAL | RTLD_NOW' to avoid cross module problems. Due to the dependency between the two libA needs to be imported first. Doing so defines and calls the registration function for the Box2f class, now when libB is imported it calls the same Box2f registration function rather its own one. This means that libAbinding.Box2f is the same as libBbinding.Box2f :(

It seems that the binding code for both libraries defines a 'register_Box2f_class' function and that renaming this in either library binding code fixes the problem. However, I was wondering if there is a way change the name of the function that gets generated through  py++ ? I've had a peek around the code and got the impression that by creating a custom 'multiple_files_t' class I could control this behaviour, but I wasn't sure whether this would be a good approach or not ?

An alternative would be to just change the name of the classes in the binding so they're not the same, but if possible we'd rather avoid introducing differences between the binding and library code.

Hopefully that makes sense, any advice/help with this would be greatly appreciated.
Thank you very much.