Author: Unknown
Subject: How to properly #include extra header files
Date: Friday, 03 Apr 2020, 22:55:35
Hello, I currently have Aspnes' stack function prototypes in a file called stack.h and the function code in stack.c. I have done #include "stack.h" at the top of both stack.c and Deque.c, but when I run make, I get an error saying there is an "undefined reference to stackPop, stackPush, etc" (Aspnes' stack functions). You said in a related post that we should include a local copy of stack.h, but I was not sure what you meant by that. Does that mean to just #include "stack.h" as I did? Do we need to add a line to our makefile, like stack.o: stack.h? Thank youPREV INDEX NEXT