How to call different functions with the same name

Discussion in 'C Programming' started by lanser, Nov 11, 2008.

  1. lanser

    lanser Guest

    Hi Gurus,

    I have two libraries, called libA and libB and I will create a driver
    placed between them, look like following:
    There is a function reference in libA, named foo, so I should
    implement it in driver.
    But libB has also a function called foo implemented, and I can't let
    libA call the foo in libB directly.
    Since I compiled by GCC, I try to weaken the foo in libB and provide a
    global foo in driver to be linked with libA.
    The question is: to implement foo in driver, I have to call the foo in
    libB for its functional, how can I do this???
    I tried alias, but it doesn't work. libA always called the foo in libB
    instead which in driver.

    Any suggestion?
    lanser, Nov 11, 2008
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.