GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 06-May-2005, 06:38
Tommmmm Tommmmm is offline
New Member
 
Join Date: Apr 2005
Posts: 5
Tommmmm is on a distinguished road

Makefile Problems


Can anyone tell me what is wrong with this makefile?

I am getting the error:

Makefile, line 10: Unexpected end of line seen

CPP / C++ / C Code:

CFLAGS = -ansi -o TheReaper
DEBUG = -g
#DEBUG =

all: TheReaper

TheReaper: TheReaper.c
           gcc $(CFLAGS)
               $(DEBUG) TheReaper.c

clean:
    rm -f TheReaper *~

  #2  
Old 06-May-2005, 12:49
Dave Sinkula Dave Sinkula is offline
Member
 
Join Date: Apr 2005
Posts: 199
Dave Sinkula will become famous soon enough
Should the command for TheReaper be all on one line?

Code:
CFLAGS = -ansi -o TheReaper DEBUG = -g #DEBUG = all: TheReaper TheReaper: TheReaper.c gcc $(CFLAGS) $(DEBUG) TheReaper.c # Move this up? clean: rm -f TheReaper *~
http://www.gnu.org/software/make/man...make.html#SEC6
  #3  
Old 06-May-2005, 20:59
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,109
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough
Quote:
Originally Posted by Tommmmm
Can anyone tell me what is wrong with this makefile?

I am getting the error:

Makefile, line 10: Unexpected end of line seen

CPP / C++ / C Code:
CFLAGS = -ansi -o TheReaper
DEBUG = -g
#DEBUG =

all: TheReaper

TheReaper: TheReaper.c
           gcc $(CFLAGS) \
               $(DEBUG) TheReaper.c

clean:
    rm -f TheReaper *~
Adding the backslash adds the next line and should fix your problem.

Mark
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
 
 

Recent GIDBlogR for statistics by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Made program in Java, trying C++ now, file i/o problems technickel C++ Forum 4 19-Feb-2005 00:32
More Reading in problems swayp C++ Forum 7 27-Jan-2005 13:27
Problems in Counting Lines in Text File wc3promet C++ Forum 2 22-Oct-2004 19:12
Chaintech Geforce 5600 FX problems bartster74 Computer Hardware Forum 8 04-May-2004 13:16
CD Burner problems dan_wood Computer Hardware Forum 3 27-Nov-2003 19:12

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:45.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.