(newbie) makefile question (newbie)

(newbie) makefile question (newbie)

Post by Paul Pluzhniko » Thu, 03 Oct 2002 00:05:03




> prodcons: prodcons.o
>         cc -lpthread prodcons.o

^^^^^^^^^^ this should be a single <TAB> character.
You probably have a 8 or 9 <SPACE> characters in there ...

Quote:> But it gives me the following error:
> bash-2.05$ make -f makefile
> makefile:2: *** missing separator.  Stop.

Also note that libraries should follow objects on command
line, not preceed them; so a better link line would be:

<TAB>cc prodcons.o -lpthread

Also, the result of your link will be 'a.out', not 'prodcons'
(as your makefile implies), so correct link line is:


Please post to appropriate newsgroup.
Followup-To: comp.unix.programmer

Cheers,
--
In order to understand recursion you must first understand recursion.

 
 
 

(newbie) makefile question (newbie)

Post by Pegg » Thu, 03 Oct 2002 11:08:36




> > prodcons: prodcons.o
> >         cc -lpthread prodcons.o

> ^^^^^^^^^^ this should be a single <TAB> character.
> You probably have a 8 or 9 <SPACE> characters in there ...

> > But it gives me the following error:
> > bash-2.05$ make -f makefile
> > makefile:2: *** missing separator.  Stop.

> Also note that libraries should follow objects on command
> line, not preceed them; so a better link line would be:

> <TAB>cc prodcons.o -lpthread

> Also, the result of your link will be 'a.out', not 'prodcons'
> (as your makefile implies), so correct link line is:



Wow... Who knows there would be such a big difference between a couple
spaces and a tab?! Thank you for your help! I really appreciate it. I
guess I can do
<TAB>cc -o prodcons prodcons.o -lpthread
if I want my executable to be named prodcons instead of a.out.

- Show quoted text -

Quote:

> Please post to appropriate newsgroup.
> Followup-To: comp.unix.programmer

> Cheers,


 
 
 

1. Newbie Makefile question

I've downloaded code from an ftp site.  The instructions in the install  
file specify the command:  make all  .  When I issue the command, I  
receive the error   bash: make command not found  .  In other words, bash  
doesn't recognize the make command.  I'm running Redhat 5.0.  Is this a  
path problem, or something else.  How might I get files to compile?

Tim Seifert
St. John's, Newfoundland, Canada

2. Slackware or Redhat, which is better???

3. Makefile newbie question...

4. Which Linux?

5. Newbie newbie newbie

6. Process Accounting

7. Newbie, Newbie, Newbie... Please be patient with me

8. DHCP gives weird hostname (RH8)

9. Newbie (I mean REAL NEWBIE) question

10. linux newbie--newbie question follows

11. Newbie question - mailing list, or web site dealing with newbies security in linux?

12. NEWBIE.. Extremely Newbie questions.

13. Newbie Q: Make and makefile