Computing.Net > Forums > Linux > Compiler confusion

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Compiler confusion

Reply to Message Icon

Name: MiKeY
Date: June 28, 2004 at 14:25:19 Pacific
OS: Suse 9.1 Professional
CPU/Ram: Althlon XP 2.4GHz/768MB
Comment:

Hello all.

I've installed Suse 9.1 Pro at home, and
it's an excellent OS.

My question is, how can I compile my C
programs the same way I do at uni?

Normally I enter the appropriate command
into the terminal, and voila! The progam
will execute inside the same window.

This is where my confusion lies: "Is the
compiler integrated into the termainal
itself or is it a seperate application that
I need to install, that just runs from
inside the terminal?"

If someone can explain this to me, that
would be great!



Sponsored Link
Ads by Google

Response Number 1
Name: Wolfbone
Date: June 28, 2004 at 18:37:41 Pacific
Reply:

The X window system terminal programmes such as xterm,aterm,eterm etc. are terminal _emulators_ - that is to say they are graphical programmes written to emulate a real physical device, a DEC VT100 for example - 'man xterm'.

Before graphics capable, pixel based monitors were invented, these character and line based display terminals were what everybody used. The VT100 at least looked a bit like a monitor but the device only knew about how to display a handful of green coloured characters and symbols and interpret a few control codes - 'man ASCII'. Still, it was better than the system console for a machine like a DEC PDP 11/70 which was just a continuous feed dot matrix printer attached to a keyboard and which made 'trek' rather an expensive game to play.

The gcc c compiler is just one of the many programmes that are now called Command Line Interface based programmes to distinguish them from graphical display based programmes.
They output ascii text characters to stdout and stderr and read from stdin and do not care much what happens to the outgoing data, which is why there must be some graphical programme or terminal device (or printer even) to properly display those ASCII codes as formatted characters and lines on a page or screen.

Since most of what people do with computers involves the processing of text, it is lucky all these facilities still exist. The major programming languages all have this text oriented processing built in to them and programming would be a nightmare if they did not. Graphical display is an add on and has had to incorporate the textual heart of programming to be of any use anyway - what is a font file for and what is this textbox I'm typing in doing?

So anyway, the terminal emulator or the Linux console is just a means of displaying the output of the vast wealth of powerful and useful text based programmes that have been developed and perfected over many years (mainly for the unix-like OSes) and which for various reasons no-one has rewritten as graphical display based utilities - though some of these programmes _have_ also been adapted to run directly (without a terminal) in a graphical mode - emacs and vim for example.


0

Response Number 2
Name: Dlonra
Date: June 29, 2004 at 07:25:25 Pacific
Reply:

are you familiar with appropriate commands: gcc and make?


0

Response Number 3
Name: MiKeY
Date: June 29, 2004 at 09:35:16 Pacific
Reply:

No. But I've got a feeling you're going to
explain what it is?? I understand that
most programs use a makefile and that's it.


0

Response Number 4
Name: heart_debian
Date: June 29, 2004 at 11:39:38 Pacific
Reply:

gcc is the GNU C compiler, "make" is the make utility of the system, it can be GNU make, BSD make or some other make. make is what parses the makefile, in order to easily compile large programs with many parts.


There are 10 kinds of people, those who count in binary and those who don't.


0

Response Number 5
Name: Dlonra
Date: June 29, 2004 at 12:15:55 Pacific
Reply:

You may not have installed gcc or make. Try "which gcc" and "which make" If they are not present, you need to install them.

If you are unfamiliar with gcc/make, you need, as everyone does, google:
"gcc tutorial" "gcc make Tutorial"


0

Related Posts

See More



Response Number 6
Name: MiKeY
Date: June 30, 2004 at 13:58:29 Pacific
Reply:

Thanks for your help guys (and gals), I
managed to compile a c program! :)


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Compiler confusion

Compilation of Peng www.computing.net/answers/linux/compilation-of-peng/24980.html

compile error help www.computing.net/answers/linux/compile-error-help/23790.html

Compilation and debugging problem www.computing.net/answers/linux/compilation-and-debugging-problem/24020.html