makefile - How to Link to a stubbed function

Discussion in 'C' started by XtremeCold, Aug 28, 2010.

  1. XtremeCold

    XtremeCold New Member

    Joined:
    Aug 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi all,
    I am developing the Test Engine for an aviation application.

    The application has a file a.c that is calling an external function CREATE_SAMPLING_PORT().
    My Test Engine has a file b.c that is calling CREATE_SAMPLING_PORT() as well.

    Each file is in different folder and has its own makefile. This CREATE_SAMPLING_PORT() is defined in the target library.

    The problem is that I want to stub CREATE_SAMPLING_PORT() so that only a.c will call my function, STUB_CREATE_SAMPLING_PORT(), instead of the original function. b.c should call the original function CREATE_SAMPLING_PORT().

    Is this possible to somehow link CREATE_SAMPLING_PORT() in a.c to my function? If not, is there a solution?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice