Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I was trying to create a makefile that target multiple main.o but I don\'t know

ID: 3715044 • Letter: I

Question

I was trying to create a makefile that target multiple main.o but I don't know what I did wrong.

(ignore the c file)(calculator.cpp, useFraction.cpp are the two main file I tried to target.)

2??? calculator.cpp c useFraction.cpp c reduce fraction.c C+4 Fraction.cpp h Fraction.h 2.png Q?? All: calculator useFraction Fraction.o: Fraction.cpp Fraction.h g+ std-c++14-Wall -c Fraction.cpp-o Fraction g++-std-c++14 -o calculator Fraction.o calculator.cpp g++ -std-c++14 o useFraction Fraction.o useFraction.cpp calculator: Fraction. o useFraction: Fraction. o clean: g++std-c++14-Wall -c Fraction.cpp-o Fraction g++ -std-c++14-o calculator Fraction.o calculator.cpp clang: error: no such file or directory: 'Fraction.o' make: ***[calculator] Error 1

Explanation / Answer

The solution for the above question is given below.
---------------------------------------------------------------------------------------------------------------

I have kept the logic simple and output as per the question.

I have bold the code that was preventing code from being compiled.

If there is anything else do let me know in comments

---------------------------------------------------------------------------------------------------------------

--------------- CODE TO COPY -----------------------------------------------------------------------

Makefle


---------------------------------------------------------------------------------------------------------------

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote