-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference if only mock the inner most functions #494
Comments
Yes, this is an easy thing to do. In your test, |
@mvandervoord Thank you very much.
They are included for sure
What can I do to include a.c? I am using create_makefile.rb to generate MakefileSupport, in the generated MakefileSupport, there are rules for a.o, b.o and test_b.o. the issue is that a.o is not added as a dependency for test_b binary, and thus I got undefined reference for the runController() function. Is there any way I can override the rules in MakefileSupport, or any option I can tune to add a.o to test_b's dependency list?
By the way, I am using CMock 2.5.3. Maybe it is too old? |
Hm. I'm not 100% sure how it's done with You've regenerated your makefile since you edited the test to include other headers? |
I am using create_makefile.rb to generate Makefile for me. the file tree loos like this
I have test_b.c to test init() function. Is it possible to only mock the inner most
rreg()
andwreg()
function? So that I can doIn my test, I got undefined reference to
runController()
function, because for thetest_b
binary,a.o
is not added as dependency in the generated Makefile, although I have includeda.h
both inb.c
andtest_b.c
, andmock_io.h
intest_b.c
The text was updated successfully, but these errors were encountered: