I want to just see if the search part of helpers.c works, but upon compiling, I get a really long error: this goes on for about 20 lines. Not sure what to do. I read through other posts, tried make find again (which is fine!)
Thanks
I want to just see if the search part of helpers.c works, but upon compiling, I get a really long error: this goes on for about 20 lines. Not sure what to do. I read through other posts, tried make find again (which is fine!)
Thanks
Pending your response, here's another question. Did you do make find
or make helpers
?
The correct command is make find
. If you ran make helpers
, it's going to give you the error that you got. The big clue is near the end: undefined reference to main
because there is no main in helpers.
Part of this lesson is about building projects from multiple source files - *.c and *.h files. Every c program requires a main() program for an entry point. In this pset, main() is in find.c. So, if you want to test without compiling find, you need to add a main() to helpers.c. However, you'll need to remove it before compiling find.c.
You can also write and compile a test program, test.c, and copy whatever you want to test into it, adding the programming stubs you might need to do the testing, but it seems like it would be just easier to compile find
.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)