How to rename all symbols of an entire library make it other library

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swapniliit2222
    New Member
    • Jan 2010
    • 1

    How to rename all symbols of an entire library make it other library

    Hi
    I have a little problem,
    I have a source code which need to be compiled in two diffrent ways
    With some diffrent # defines in both cases.
    And I need to link both library to link to the same binary.
    Problem is the due to diffrent # defines some functions behave diffrently.
    And sorce code need to be compiled in both ways.
    So I thought of a solution to change the name of symbols after compilation rename the library and link both library with the binary.
    Some help on this issue will be very helpful.
    Regards
    Swapnil
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You cannot change the names of symbols after compilation. All you have is a binary executable. You can't even tell if it was compiled.

    Try this:

    Code:
    #ifdef  METHOD-A
    #define  X 10
    #endif
    #ifdef METHOD-B
    #define X 20
    #endif
    Just define METHOD-A of METHOD-B at the build level.

    Add the libraries the linker input.

    Comment

    Working...