I’m making progress but without really understanding the big picture for now.

When you build a C project does it look for the header files first and then find a matching definition in a C file, then linking and compiling based on that?

I did an experiment where I changed the name of the .c file and it worked fine regardless of the name. So is it the header file name that matters the most?

I’m learning as I go so I apologize if I should have read this in a book or manual somewhere. If there is a helpful resource I would appreciate a link to it please. :)

@derickflorian It first looks for the .c files, the job of the .h files is to just let the compiler know what functions or types the code previously parsed is talking about.

Follow

@xddz Ok, thank you! I think my IDE too was set up to look in my project directory for the .c files which explained the “magic” of it picking up the files.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.