When I include c files, I start to get undefined references to other functions. Then, I have to start including the c files that contain the functions. How do I get around this? The undefined references are referenced in the c files that I include, but since I am not actually including those files, I get undefined references.
Share
Generally one includes “.h” files, not “.c” files.
If you call a function declared in a .h file, it is not sufficient to compile the starting C file to get a complete program — you also need to link in the object files associated with the code that implements the declared functions. These might be in a library, in which case you need to link with that library.