Jump to content
Compatible Support Forums
Sign in to follow this  
Bahamut

utilisation gcc

Recommended Posts

comment on utilise gcc ???

j'ai crée un fichier en C, puis j'ai tapé

gcc tmp.c

en sortie j'ai un fichier a.out et après ???

comment je lance ce que j'ai compilé ???

Share this post


Link to post

1) to compile:

Code:
gcc -o output_file source.c

2) to run:

Code:
./output_file

 

PS: type "man gcc" if you need more information

Share this post


Link to post

Bahamut,

 

The gcc compiler names it's output file by default a.out . To run it, you can

just type

 

./a.out

 

To force gcc to give the output file another name, you can use the -o flag

as nebulus suggested. And yes, you will find that for many programs on

your Linux system there are man pages. Although they are not always

easy to read, they contain a wealth of information.

 

G

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×