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:
    libA
    |
    driver
    |
    libB
    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
    1. Advertising

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.
Similar Threads
  1. Replies:
    5
    Views:
    341
    Alf P. Steinbach
    Feb 6, 2006
  2. Fabrizio Pollastri
    Replies:
    2
    Views:
    346
  3. Christopher Brewster
    Replies:
    5
    Views:
    347
    John Machin
    Nov 14, 2008
  4. bluebaron
    Replies:
    3
    Views:
    748
    Jonathan N. Little
    Nov 4, 2009
  5. Guest
    Replies:
    2
    Views:
    180
    Foo Man Chew
    Dec 29, 2003
Loading...

Share This Page