Skip to content

Declared here, defined there, Ceedling can't seem to find it #723

Answered by mvandervoord
jnz86 asked this question in Q&A
Discussion options

You must be logged in to vote

You're correct about your assessment. Ceedling isn't pulling in additional.c because you haven't told it to. It knows what to import based on the #includes you've provided, and this isn't one of them.

There are a couple solutions. First, you could directly include the C file in your test:

#include "additional.c"

Second, you could create a header for additional.h, even if it's only used in tests (you could even put it in a test folder, instead of the normal source folder, so long as you tell ceedling that it might be there by adding the path to your includes list.)

The advantage of this second method is that it would make the functions in additional.c mockable, in the even that any of you…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jnz86
Comment options

Comment options

You must be logged in to vote
3 replies
@jnz86
Comment options

@jnz86
Comment options

@mvandervoord
Comment options

Answer selected by jnz86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants