LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-09-2006, 04:11 AM   #1
athena_1
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Rep: Reputation: 0
a shell for make, compile and run programs


the question is more about shell programming. I need a shell file to:
compile(with g++ compiler), link and run a program and also save the output in a special addressed file.
 
Old 07-09-2006, 04:31 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Read up on using make.
 
Old 07-10-2006, 06:05 AM   #3
athena_1
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks but Sry. I know to use make and create makefile but the shell program I need dosen't contain just makefile. I need many more operations.
 
Old 07-11-2006, 04:16 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Something like: "make $1 && chmod +x $1 && ./$1"
 
Old 07-11-2006, 11:52 AM   #5
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
Assuming that your "special addressed file" is $1, then you use the minus o option of cc to create the output in the special addressed file.

By "special addressed file" if you mean node, then `mknod`.
End
 
Old 07-23-2006, 10:45 AM   #6
athena_1
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Original Poster
Rep: Reputation: 0
thanks for ur help. my prob is solved
 
  


Reply

Tags
makefile, programming, shell



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kdevelop doesn't run the programs I compile frogbert Linux - Software 2 12-10-2004 04:02 PM
Can't Run Make (any programs) on FC2 beefheart Fedora 4 10-26-2004 03:18 PM
how to run a compile file in shell? v3sS0n Linux - Newbie 2 09-25-2004 05:47 AM
shell script beginer run programs spoody_goon Programming 2 03-27-2004 07:12 PM
How do i make programs run as services? (Example: psybnc/eggdrop) Sxzph Linux - General 4 03-21-2004 08:31 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration