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é ???.

Everything Linux 1800 This topic was started by , . Last reply by ,


data/avatar/default/avatar24.webp

4 Posts
Location -
Joined 2003-04-14
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é ???

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Apr 18
Created
Apr 23
Last Response
0
Likes
1 minute
Read Time
User User User
Users

Responses to this topic


data/avatar/default/avatar05.webp

214 Posts
Location -
Joined 2002-10-05
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

data/avatar/default/avatar19.webp

24 Posts
Location -
Joined 2003-04-15
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