Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,562 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,887 people online right now. Registration is fast and FREE... Join Now!




C on unix

 
Reply to this topicStart new topic

C on unix, how to compile c programme in unix and run

amolsandy
6 May, 2008 - 03:05 AM
Post #1

New D.I.C Head
*

Joined: 6 May, 2008
Posts: 1

how to compile c programme in unix and run[/size]

Thanks
Amol
User is offlineProfile CardPM
+Quote Post

pertheusual
RE: C On Unix
6 May, 2008 - 10:03 AM
Post #2

D.I.C Head
**

Joined: 26 Jan, 2008
Posts: 231



Thanked: 3 times
My Contributions
Generally questions like these are what Google is for....

Usually, the command for compiling is "gcc inputfile.c -o outputfile"
Then to run an executable, you do "./outputfilename" <- make sure to have the "./" before.

gcc is probably already installed, but you'll have to check.

Per
User is offlineProfile CardPM
+Quote Post

ajaymatrix
RE: C On Unix
6 May, 2008 - 11:34 PM
Post #3

D.I.C Regular
Group Icon

Joined: 15 May, 2007
Posts: 389



Thanked: 1 times
Dream Kudos: 100
My Contributions
gcc filename , followed by ./a.out
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: C On Unix
6 May, 2008 - 11:39 PM
Post #4

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,465



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
QUOTE(pertheusual @ 6 May, 2008 - 02:03 PM) *

Usually, the command for compiling is "gcc inputfile.c -o outputfile"
Then to run an executable, you do "./outputfilename" <- make sure to have the "./" before.

You should also be able to run make inputfile as long as it's a single .c or .cpp program.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 11:45PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month