LinuxQuestions.org
Review your favorite Linux distribution.
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 08-28-2003, 07:42 AM   #1
embalmedlenin
LQ Newbie
 
Registered: Feb 2003
Location: Apex, North Carolina
Distribution: Debian
Posts: 29

Rep: Reputation: 15

Can someone tell me how you would compile a program from start to finish in linux. Thanks
 
Old 08-29-2003, 12:48 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It varies between applications. Take a look at the documentation that came with the software yuo wnat to install. Jeremy has written a simple starters guide here:
http://www.linuxquestions.org/questi...ticle&artid=15

If you get specific problems then post them.
 
Old 08-29-2003, 12:53 PM   #3
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 33
U haven't specified what program u want to compile . It varies ....
Like for a perl program u use "perl <program_name>" whereas for a C program u use "cc <program_name>" n then the executable a.out is formed which when executed using "./a.out" , we get the required output
 
Old 08-29-2003, 04:38 PM   #4
geoffe02
LQ Newbie
 
Registered: Aug 2003
Location: California
Distribution: Mandrake 9.1
Posts: 4

Rep: Reputation: 0
Well, I am a programming newbie...but I will tell you what I know.

Suppose I have my simple helloworld.cpp C++ program. so I go into the directory it is in and type:

"g++ helloworld.cpp -Wall -o helloworld"

and then, I would need the resultant output file made as an executable file...

"chmod 777 helloworld"

the run it by...

"./helloworld"
that is what I know so far.... :-)
 
Old 08-29-2003, 05:16 PM   #5
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
geoffe02: before "chmod 777 helloworld" you might want to look at the permissions helloworld has "ls -l | grep helloworld" notice its already executable.

if you didnt know "chmod 777" makes a file writable by anybody, a generally bad idea. chmod 755 might be better.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Compiling a program for X-Linux 4.1 steaktc Programming 7 11-01-2005 07:36 AM
help compiling a program minm Linux - Newbie 3 10-10-2005 01:14 AM
Compiling a Program? dbzw Linux - Software 4 10-09-2005 01:31 PM
Compiling a program lintho Linux - Software 2 08-24-2004 07:41 AM
Compiling Program Star3132 Linux - General 8 06-29-2004 05:35 AM

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

All times are GMT -5. The time now is 10:30 PM.

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