LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2005, 06:32 PM   #1
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Rep: Reputation: 15
Compiling C with GCC in Fedora


[CODE]$ ls
fig02_01.c fig02_01.c~ fig02_03.c
$ man gcc

[1]+ Stopped man gcc
$ gcc fig02_01.c
$ ls
a.out fig02_01.c fig02_01.c~ fig02_03.c

Now, from what I can remember that a.out is assigned if I don't assign a name to what I compiled? Is that correct? I guess a.out means that it's compiled, so how do I see the results? Run it, I guess? I've been looking on linux command dir, and I don't see anything that resembles what I remember.

Thanks,

Markness
 
Old 04-28-2005, 06:41 PM   #2
damicatz
Member
 
Registered: May 2004
Distribution: FreeBSD 7, Debian "Squeeze", OpenBSD 4.5
Posts: 167

Rep: Reputation: 30
If what you are compiling is a program you should be able to chmod 755 a.out and then run it using the command ./a.out.

And yes, a.out is the default name.
 
Old 04-28-2005, 07:27 PM   #3
devilkin
Member
 
Registered: Jan 2005
Location: Australia
Distribution: LFS 6.0 #15056
Posts: 50

Rep: Reputation: 15
to change the name it outputs to use -o [filename] switch, you should also use -Wall to show all the compiler warnings.
 
Old 04-28-2005, 09:01 PM   #4
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
Code:
$ ls
02_01  fig02_01.c
$ ./02_01
Welcome to C!
^ 1337. WATCH OUT! @_@ Thanks for the help guys.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel compiling: gcc-3.3 is 586, should be gcc-3.3 386 Erik Plaggenmar Linux - Software 0 10-01-2004 11:38 AM
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM
Compiling gcc CuteBug Linux - Software 2 02-22-2004 09:19 AM
Fedora running VMware/GCC compiling atko Fedora 3 12-14-2003 06:49 AM
Compiling C++ GCC poeta_boy Linux - Newbie 14 10-14-2003 04:23 PM


All times are GMT -5. The time now is 07:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration