# C Compiler under Fedora

**URL:** <https://boards.straightdope.com/t/c-compiler-under-fedora/604323>\
**Category:** Factual Questions\
**Created:** [November 28, 2011, 6:03am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323 "2011-11-28T06:03:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 28, 2011, 6:03am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/1 "2011-11-28T06:03:55Z")

</div>

I’m trying to learn some C/C++ programming and would like to do so under Fedora. I’ll be getting Fedora 15 as an OS. I’ve taken a look at the GNU Compiler and frankly it seems a bit more than I want to deal with as a beginner. Does anyone know of another FREE C/C++ compiler I could use?

Thanks and regards

Testy

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [November 28, 2011, 6:06am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/2 "2011-11-28T06:06:35Z")

</div>

The GNU compiler is what you want to use. The compiler won’t affect how easy or hard it is to learn C. For basic stuff, all you need to do is:

gcc -o foo foo.c

---

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 28, 2011, 6:11am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/3 "2011-11-28T06:11:23Z")

</div>

> [@friedo](#):
>
> The GNU compiler is what you want to use. The compiler won’t affect how easy or hard it is to learn C. For basic stuff, all you need to do is:
> 
> gcc -o foo foo.c

**freido**

Thank you for this. I was looking through some of the GNU documentation and it seemed like overkill with the multi-platform multi-language thing. I’ll give it a try anyway.

Thanks again

testy

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [November 28, 2011, 6:50am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/4 "2011-11-28T06:50:25Z")

</div>

Well, yeah. The man page’s job is to list _every_ single option and doohickey there is. 99% of those will be irrelevant for a beginner, so don’t get overwhelmed. C is a great language to learn. Happy coding!

---

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 28, 2011, 6:55am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/5 "2011-11-28T06:55:17Z")

</div>

> [@friedo](#):
>
> Well, yeah. The man page’s job is to list _every_ single option and doohickey there is. 99% of those will be irrelevant for a beginner, so don’t get overwhelmed. C is a great language to learn. Happy coding!

They do a GREAT job of listing every possible permutation. Unfortunately for me.😛  
I wish they had a web site or something with a “So you’re a complete noob” title.

Thanks

Testy

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [November 28, 2011, 8:16am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/6 "2011-11-28T08:16:44Z")

</div>

> [@Testy](#):
>
> They do a GREAT job of listing every possible permutation. Unfortunately for me.😛  
> **I wish they had a web site or something with a “So you’re a complete noob” title.**
> 
> Thanks
> 
> Testy

Just google for c tutorials or learning c and you’ll find zillions of them to choose from.

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [November 28, 2011, 11:52am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/7 "2011-11-28T11:52:55Z")

</div>

> [@Senegoid](#):
>
> Just google for c tutorials or learning c and you’ll find zillions of them to choose from.

…many of which are unfortunately utter crap. Even many published books on C are utter crap. The [Association of C and C++ Users](http://accu.org/) maintains an online database of book reviews which you can use to identify a good introductory text. One of they books they recommend is K. N. King’s _C Programming: A Modern Approach_, which I’ve used with some success in the courses I’ve taught.

---

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 28, 2011, 4:25pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/8 "2011-11-28T16:25:20Z")

</div>

> [@psychonaut](#):
>
> …many of which are unfortunately utter crap. Even many published books on C are utter crap. The [Association of C and C++ Users](http://accu.org/) maintains an online database of book reviews which you can use to identify a good introductory text. One of they books they recommend is K. N. King’s _C Programming: A Modern Approach_, which I’ve used with some success in the courses I’ve taught.

**psychonaut**

Thanks for this. I’m limited to a shoestring budget right now but if things work out I’ll give the ACCU a try. They look like a very dedicated bunch.

Regards

Testy

---

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 28, 2011, 4:28pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/9 "2011-11-28T16:28:29Z")

</div>

> [@Senegoid](#):
>
> Just google for c tutorials or learning c and you’ll find zillions of them to choose from.

**Senegoid**

Thank you. I have checked quite a few sites but so far haven’t found what I’m looking for. I have a few C++ manuals that may be enough to get me started but I need a free, simple compiler right now. Looks like I’ll be using the GNU compiler.

Thanks for your reply

Testy

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [November 28, 2011, 4:30pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/10 "2011-11-28T16:30:21Z")

</div>

I second going with gcc. Installing anything else now is going to give you two problems: Learning C, and learning how to get help with a compiler not as many people are using.

Try other compilers once you know C and know how to work gcc well enough to get what you want reliably. Most other C compilers for Linux are geared to be friendly to people who are experienced with gcc; they have the same basic options that mean the same basic things, and differ in ways that aren’t relevant to someone just starting out with C.

---

<div class="post-metadata">

**Author:** ![UncleRojelio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/unclerojelio/32/3160_2.png) [@UncleRojelio](https://boards.straightdope.com/u/UncleRojelio)\
**Post date:** [November 28, 2011, 4:50pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/11 "2011-11-28T16:50:00Z")

</div>

I’ll third it. gcc is the standard.

---

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 28, 2011, 5:51pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/12 "2011-11-28T17:51:37Z")

</div>

> [@Derleth](#):
>
> I second going with gcc. Installing anything else now is going to give you two problems: Learning C, and learning how to get help with a compiler not as many people are using.
> 
> Try other compilers once you know C and know how to work gcc well enough to get what you want reliably. Most other C compilers for Linux are geared to be friendly to people who are experienced with gcc; they have the same basic options that mean the same basic things, and differ in ways that aren’t relevant to someone just starting out with C.

**Derleth**

It sounds good and I’ll use the GCC. I suppose I was just a bit intimidated by the number of options they list.

Thanks

Testy

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [November 28, 2011, 6:09pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/13 "2011-11-28T18:09:44Z")

</div>

> [@Testy](#):
>
> It sounds good and I’ll use the GCC. I suppose I was just a bit intimidated by the number of options they list.

I am a happy _gcc_ user and often use it with few command-line options, or even none at all.

Even the widely applauded maximize-warning option ( _-W{,all}_ ) isn’t necessary: In my experience, compiler warnings which affect local execution will usually be the **insuppressible** warnings. Warnings seen only with _-W{,all}_ are usually just portability concerns.

But please don’t use this post to turn against _gcc_ options. :rolleyes:

---

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 28, 2011, 6:42pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/14 "2011-11-28T18:42:33Z")

</div>

> [@septimus](#):
>
> I am a happy _gcc_ user and often use it with few command-line options, or even none at all.
> 
> Even the widely applauded maximize-warning option ( _-W{,all}_ ) isn’t necessary: In my experience, compiler warnings which affect local execution will usually be the **insuppressible** warnings. Warnings seen only with _-W{,all}_ are usually just portability concerns.
> 
> But please don’t use this post to turn against _gcc_ options. :rolleyes:

**septimus**

I won’t, especially since I’m somewhat unsure what you’re talking about.😛

Thanks

Testy

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 28, 2011, 8:42pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/15 "2011-11-28T20:42:34Z")

</div>

You don’t even need the -o option; that just tells it what you want the compiled program to be called. It’ll still work just fine without that, though, and just give the compiled program the default name of a.out (which you can then rename yourself if you’d like).

---

<div class="post-metadata">

**Author:** ![Simplicio](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@Simplicio](https://boards.straightdope.com/u/Simplicio)\
**Post date:** [November 28, 2011, 8:47pm UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/16 "2011-11-28T20:47:07Z")

</div>

> [@septimus](#):
>
> I am a happy _gcc_ user and often use it with few command-line options, or even none at all.
> 
> Even the widely applauded maximize-warning option ( _-W{,all}_ ) isn’t necessary: In my experience, compiler warnings which affect local execution will usually be the **insuppressible** warnings. Warnings seen only with _-W{,all}_ are usually just portability concerns.
> 
> But please don’t use this post to turn against _gcc_ options. :rolleyes:

Whatever flag it is that gives you the name of the array involved when there’s a memory overrun is pretty useful for beginners (or really everybody). Agree that most of the other extra warnings aren’t really needed, at least in my experience.

---

<div class="post-metadata">

**Author:** ![rbroome](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rbroome](https://boards.straightdope.com/u/rbroome)\
**Post date:** [November 29, 2011, 3:35am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/17 "2011-11-29T03:35:09Z")

</div>

> [@Testy](#):
>
> I’m trying to learn some C/C++ programming and would like to do so under Fedora. I’ll be getting Fedora 15 as an OS. I’ve taken a look at the GNU Compiler and frankly it seems a bit more than I want to deal with as a beginner. Does anyone know of another FREE C/C++ compiler I could use?
> 
> Thanks and regards
> 
> Testy

gnu compiler. everything you invest in it will be worth it. And as mentioned upthread. The compiler won’t matter to learning C. Learn some of the flags- mostly -fbacktrace -fbounds-check, and you are good to go.

---

<div class="post-metadata">

**Author:** ![griffin1977](https://avatars.discourse-cdn.com/v4/letter/g/977dab/32.png) [@griffin1977](https://boards.straightdope.com/u/griffin1977)\
**Post date:** [November 29, 2011, 3:43am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/18 "2011-11-29T03:43:20Z")

</div>

Yeah, its all C underneath, so the compiler is unimportant.

If the whole command-line/makefile thing is a bit much for you (I know its a bit much for me at times 🙂 ) you should get an IDE which wraps the compile in something a bit easier to understand.

I’d recommend [CodeBlocks](http://www.codeblocks.org/) or [Eclipse](http://www.eclipse.org/).

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 29, 2011, 4:09am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/19 "2011-11-29T04:09:11Z")

</div>

Oh, and don’t worry too much about the man page for gcc itself. There’s actually an entire section of man pages for all the things inside c. If you’re wondering about how to use some function, use man -s3 _functionname_ – That will generally be much more accessible than the man page for the compiler as a whole.

---

<div class="post-metadata">

**Author:** ![Testy](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Testy](https://boards.straightdope.com/u/Testy)\
**Post date:** [November 29, 2011, 4:20am UTC](https://boards.straightdope.com/t/c-compiler-under-fedora/604323/20 "2011-11-29T04:20:04Z")

</div>

> [@rbroome](#):
>
> gnu compiler. everything you invest in it will be worth it. And as mentioned upthread. The compiler won’t matter to learning C. Learn some of the flags- mostly -fbacktrace -fbounds-check, and you are good to go.

**rbroome**

Thank you for this. Right now I’m more in the “Hello World” stage of things but I’ll remember this when I get far enough along for it to make sense to me.

Thanks again

Testy

[Next page](https://boards.straightdope.com/t/c-compiler-under-fedora/604323.md?page=2)
