Question
Why can't my makefile compiled? My Makefile is like this: execute: Main.o Student.o Course.o Enrollment.o PrintData.o StoreData.o LoadData.o g++ -o execute Main.o Student.o Course.o Enrollment.o
Why can't my makefile compiled?
My Makefile is like this:
execute: Main.o Student.o Course.o Enrollment.o PrintData.o StoreData.o LoadData.o g++ -o execute Main.o Student.o Course.o Enrollment.o PrintData.o StoreData.o LoadData.o Main.o: Main.cpp Student.h Course.h Enrollment.h PrintData.h StoreData.h LoadData.h g++ -c Main.cpp Student.o: Student.cpp Student.h g++ -c Student.cpp Course.o: Course.cpp Course.h g++ -c Course.cpp Enrollment.o: Enrollment.cpp Student.h Course.h Enrollment.h g++ -c Enrollment.cpp PrintData.o: PrintData.cpp Student.h Course.h Enrollment.h PrintData.h g++ -c PrintData.cpp StoreData.o: StoreData.cpp Student.h Course.h Enrollment.h StoreData.h g++ -c StoreData.cpp LoadData.o: LoadData.cpp Student.h Course.h Enrollment.h LoadData.h g++ -c LoadData.cpp clean: rm *.o execute run: make execute && ./execute
My main:
#include "Student.h" #include "Course.h" #include "Enrollment.h" #include "PrintData.h" #include "StoreData.h" #include "LoadData.h"
Student.cpp : #include "Student.h"
Course.cpp: #include "Course.cpp"
Enrollment.cpp: #include "Enrollment.h" #include "Course.h" #include "Student.h"
PrintData.cpp:
#include "Enrollment.h" #include "Student.h" #include "Course.h" #include "PrintData.h"
StoreData.cpp:
#include "Enrollment.h" #include "Student.h" #include "Course.h" #include "StoreData.h"
LoadData.cpp
#include "Enrollment.h" #include "Student.h" #include "Course.h" #include "LoadData.cpp"
I cant run my make file to compile? It keeps giving me "Nothing to be done", or "No targets specificed and no makefile found. Stop". Please help
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started