Author: Stan Eisenstat
Subject: Re: [Cs223] Deque.c compilation error
Date: Sunday, 29 Mar 2020, 16:23:49
> Message Posted By: Unknown > > I have written Deque.c and I am trying to compile it using Makefile that > you have provided. I have included "#include "/c/cs223/Hwk4/Deque.h" " in > Deque.c but for some reason the program still does not compile and outputs > this message: > > undefined reference to `main' > collect2: error: ld returned 1 exit status > > There is no "main" in my Deque.c since it was not included in protoDeque.c > and my Qsort.c does not contain 'main' yet. Is there a way to compile and > test Deque.c before starting Qsort.c? Thank you. To create an executable program one of the object files must define the main() function. Hwk4/Makefile includes rules to create an executable from Deque.o and Hwk4/example.c or Hwk4/testDeque.c, either of which can be used for testing. --Stan-PREV INDEX NEXT