[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newby Question
From: |
Paul Smith |
Subject: |
Re: Newby Question |
Date: |
Wed, 13 Apr 2011 00:49:16 -0400 |
On Tue, 2011-04-12 at 17:28 -0700, Casper3912 wrote:
> Here is my make file:
> # Make File For AHeapOfStudents Project
>
> CC = g++
> CFLAGS = -g
> CMD = AHeapOfStudents_exec
>
> OBJS = Main.o Student.o Address.o Date.o Name.o Proformance.o
> CCFILES = Main.cc Student.cc Address.cc Date.cc Name.cc Proformance.cc
> HFILES = Student.h Address.h Date.h Name.h Proformance.h
>
> $(CMD): $(OBJS)
> $(CC) -o $(CMD) $(OBJS)
>
> Main.o: Main.cc Student.h
> $(CC) $(CFLAGS) -c Main.cc
>
> Student.o: Student.cc Address.h Date.h Name.h Performance.h
> $(CC) $(CFLAGS) -c Student.cc
>
> Address.o: Address.cc Address.h
> $(CC) $(CFLAGS) -c Address.cc
>
> Date.o: Date.cc Date.h
> $(CC) $(CFLAGS) -c Date.cc
>
> Name.o: Name.cc Name.h
> $(CC) $(CFLAGS) -c Name.cc
>
> Performance.o: Performance.cc Performance.h
> $(CC) $(CFLAGS) -c Performance.cc
>
>
>
> And here is the response when I attempt to build:
>
>
> make Main
> g++ Main.cpp -o Main
Why are you trying to build something called "Main" (by passing the
argument "Main" to the make command) when your makefile says the command
you want to build is "AHeapOfStudents_exec" ?
Also where did this "Main.cpp" file come from? Your makefile says your
source files end in ".cc", not ".cpp".
The output you show doesn't match at all what your makefile says, so
there's something missing here.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- Newby Question, Casper3912, 2011/04/13
- Re: Newby Question,
Paul Smith <=