utilisation gcc
This is a discussion about utilisation gcc in the Everything Linux category; 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é ???.
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é ???
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é ???
Participate in our website and join the conversation
This subject has been archived. New comments and votes cannot be submitted.
Apr 18
Apr 23
0
1 minute
Responses to this topic
1) to compile:
Code:
Code:
PS: type "man gcc" if you need more information
Code:
gcc -o output_file source.c2) to run:
Code:
./output_file
PS: type "man gcc" if you need more information
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
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