c++ - Shared library name collisions -



c++ - Shared library name collisions -

i'm distributing shared library (c++) , python module uses library. build modified version of bullet physics library (as cmake subproject). utilize bullet classes , functions in 1 file--bullet_interface.cpp--and bullet stuff hidden within "namespace {...}".

the problem other libraries require bullet scheme dependency , link scheme version of bullet. in fact, 1 of dependencies of library (libopenrave) exports bullet symbols. (more specifically, dynamically loads plugin exports bullet symbols).

i'm wondering if there's way build library bullet_interface.cpp uses right bullet functions, library doesn't create of bullet symbols visible. can't utilize scheme bullet because had create changes source code. 1 hacky solution rename of bullet functions , classes using search , replace (almost contain string "bt"). there improve way?

this bit of roundabout way accomplish want, beats search-and-replace in bullet code.

you can seek 'prefixing' symbols in bullet library using objcopy utility this:

objcopy --prefix-symbols=old_ bullet.a

this should work dynamic library well, you'll have seek it. see this answer details.

c++ shared-libraries visibility name-clash

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -