C Compiler under Fedora

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

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

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.:stuck_out_tongue:
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.

…many of which are unfortunately utter crap. Even many published books on C are utter crap. The Association of C and C++ Users 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

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

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.

I’ll third it. gcc is the standard.

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

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.:stuck_out_tongue:

Thanks

Testy

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).

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.

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.

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 :slight_smile: ) you should get an IDE which wraps the compile in something a bit easier to understand.

I’d recommend CodeBlocks or Eclipse.

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.

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