gcc questions

Amadeus W. M. amadeus84 at cablespeed.com
Sun Nov 27 15:17:50 UTC 2005


On Sat, 26 Nov 2005 13:16:25 +0200, Dotan Cohen wrote:

> We're learning C in the university and we MUST compile on Turbo C. So
> I need to know how different that piece of windows software is from
> gcc. If I compile in gcc, can I safely bet that the code will compile
> in Turbo C? What must I know in order to assume compatibility?
> 
> Also, all files that gcc outputs are of the name a.out. I want it to
> give the .out file the original name of the file, with a .out. I have
> manned and discovered the -o option, whereby I can specify a filename,
> but I would prefer that it would read the original filename and use
> that. For instance:
> $gcc mycode.c
> $ls
> mycode.c    mycode.out
> 
> How can I encourage this behaviour? Thank you.
> 
> Dotan Cohen
> http://technology-sleuth.com/long_answer/what_are_the_advantages_of_lcd_monitors.html


It seems that you're really beginning with C. You asked, and you got
good, specific advice. But it won't be very easy to learn C from the gcc
man page. A good C book will be a good investment. If you decide to buy
one, let it be "The C Programming Language" by Kernighan & Ritchie - the
very authors of C. It is the best book on C. Similarly, if you ever want
to learn C++ get Stroustrup's "The C++ Programming Language". Any
university library should have them.

Oh, yeah, and you may want to check out the compiler specific newsgroups,
like gnu.gcc.help or gnu.g++.help.






More information about the fedora-list mailing list