AliZiaCiit
Would you like to react to this message? Create an account in a few clicks or log in to continue.

assignment 1,, any one have terminal commands to run c compiler, how to compile & write c program

2 posters

Go down

assignment 1,, any one have terminal commands to run c compiler, how to compile & write c program Empty assignment 1,, any one have terminal commands to run c compiler, how to compile & write c program

Post  BCS-FAO7-22/LHR Fri Oct 02, 2009 12:30 pm

any one have terminal commands to run c compiler, how to compile & write c program

BCS-FAO7-22/LHR

Posts : 2
Join date : 2009-09-03

Back to top Go down

assignment 1,, any one have terminal commands to run c compiler, how to compile & write c program Empty execute code

Post  bcsf7-007 Fri Oct 02, 2009 1:17 pm

for example Your code file simple.c is locate on desktop

the way to run it

1 : open terminal
2 : type ls
3 : the directory list will
4 : type cd Desktop(Must be same as list)
5 : for compling file use gcc compiler the way is type gcc filemane or gcc -o objectfilename.out file name
for 1 examlpe gcc simple.c or
2 gcc -o simplebinary.out simple.c
6 : this will create a binary file in which directory you are currently you in desktop in first example file is a.out and in 2 that name you will give like simplebinary.out

7 : run type ./a.out for 1 example ./simplebinary.out for second

key point :
cd Desktop
gcc simple.c
./a.out

bcsf7-007

Posts : 2
Join date : 2009-09-06

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum