LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-08-2003, 03:43 PM   #1
Hady
Member
 
Registered: Nov 2003
Posts: 55

Rep: Reputation: 15
Post Compile C files!


hi,
when I write
gcc *.c -o
i receive the a.out

how can I run this a.out?
 
Old 11-08-2003, 04:34 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
./a.out

./ is a shortcut for current working directory.
 
Old 11-08-2003, 04:55 PM   #3
computergeek84
Member
 
Registered: Nov 2003
Location: /dev/null
Distribution: Gentoo, Ubuntu
Posts: 61

Rep: Reputation: 15
You could also type:

gcc -o [filename] source.cpp

and your executable program will be called [filename].
 
Old 11-08-2003, 05:12 PM   #4
needforspeed
Member
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 73

Rep: Reputation: 15
I use the format

g++ source.cpp -o [filename]

or gcc, whichever you are using
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What do I add to compile/make files? vinoloco Ubuntu 5 04-12-2005 11:21 PM
What do I add to compile/make files? vinoloco Linux - Newbie 1 04-08-2005 04:30 PM
how to compile .torrent files zameer_india Linux - Newbie 4 01-06-2005 12:22 AM
Using g++ to compile multiple source files arnab_be Linux - Newbie 1 03-03-2004 02:21 PM
compile..can't find library files doublefailure Linux - General 3 12-03-2002 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration