Berkeley CSUA MOTD:Entry 16311
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/12/24 [General] UID:1000 Activity:popular
12/24   

1999/8/13-15 [Computer/SW/Languages/Perl] UID:16311 Activity:kinda low
8/13    How can I use two different programming libraries that share many of
        the same function names.  I don't want to go through and change the
        function names everywhere and recompile--it's not really possible
        in this situation.  Basically is there anyway to say that everything
        from a library should be prefaced with LIB1__ to be used (but NOT
        have to recompile the lib)?  -drex
        \_ you could write a program using libbfd
        \_ you ahve to write your own wrapper for every single
           function in one of the libraries, and use dlopen()
        \_ sed
        \_ write a perl script to prefix the function names and recompile
        the lib sources
        \_ cpp.
        \_ Why is this still up here? I answered it definitively.
            You have to make wrappers for each conflicting function,
            and use dlopen(), etc to make the wrappers actually
            work.