gcc Assignment3.o main.o list_node.o -o Assignment3 gcc main_css_html.o HTMLMaker.o CSSMaker.o -o CreateHTML HTMLMaker.o: file not recognized: File format not recognized collect2: ld returned 1 exit status
From the research that I did I gathered that the file not recognized thing usually happens when there is no file extension specified. Clearly in this case I have specified the file extension. Also, since I am not very good with Makefiles and I know that the problem very well could be in the makefile I will include that:
CC = gcc INC = -I. FLAGS = -W -Wall all: Assignment3 Tester CreateHTML HTMLTester Assignment3: Assignment3.o main.o list_node.o $(CC) $^ -o $@ CreateHTML: main_css_html.o HTMLMaker.o CSSMaker.o $(CC) $^ -o $@ Tester: test.o list_node.o Assignment3.o $(CC) $^ -o $@ HTMLTester: HTMLMaker.o CSSMaker.o main_test.o TestHTMLMaker.o TestCSSMaker.o $(CC) $^ -o $@ Assignment3.o: Assignment3.c Assignment3.h $(CC) -c $(FLAGS) $(INC) $< -o $@ main.o: main.c $(CC) -c $(FLAGS) $(INC) $< -o $@ test.o: test.c $(CC) -c $(FLAGS) $(INC) $< -o $@ list_node.o: list_node.c list_node.h $(CC) -c $(FLAGS) $(INC) $< -o $@ main_tester.o: main_test.c $(CC) -c $(FLAGS) $(INC) $< -o $@ TestHTMLMaker.o: TestHTMLMaker.c TestHTMLMaker.h $(CC) -c $(FLAGS) $(INC) $< -o $@ TestCSSMaker.o: TestCSSMaker.c TestCSSMaker.h $(CC) -c $(FLAGS) $(INC) $< -o $@ HTMLMaker.o: HTMLMaker.h HTMLMaker.c $(CC) -c $(FLAGS) $(INC) $< -o $@ CSSMaker.o: CSSMaker.c CSSMaker.h $(CC) -c $(FLAGS) $(INC) $< -o $@ main_css_html.o: main_css_html.c $(CC) -c $(FLAGS) $(INC) $< -o $@ .PHONY : clean clean: -rm -f *.o Assignment3 Tester CreateHTML
Thanks for the help and if you need any more information please let me know.


Sign In
Create Account


Back to top









