Teen Programmers Unite  
 

 

Return to forum top

What is a compiler

Posted by diegoeskryptic [send private reply] at May 07, 2002, 05:57:14 PM

just exactly what is a compiler? Ive heard of borland and microsoft.... what is the difference of the different types of compilers out there?

Posted by CodeRed [send private reply] at May 07, 2002, 08:22:35 PM

Borland and Microsoft Visual Studio are IDE's, or more accurately they are developement suits as they include an editor, compiler, linker, debugger, etc in one neat package.

Posted by FatalDragon [send private reply] at May 07, 2002, 09:14:59 PM

A compiler translates programming language codes into binary codes that are understood by the CPU. Borland and Microsoft are the main C compilers, but there are several free C compilers.

Posted by FatalDragon [send private reply] at May 07, 2002, 09:15:36 PM

GCC, is another main compiler, but its for Linux.

Posted by diegoeskryptic [send private reply] at May 07, 2002, 09:47:31 PM

so therefore... each programming language has its own compiler?

Posted by CodeRed [send private reply] at May 07, 2002, 09:50:44 PM

Or interpreter, yes

Posted by vikram_1982 [send private reply] at May 07, 2002, 10:09:56 PM

And for the difference between a compiler and an interpreter, think of it this way. A Compiler will consider the program as a whole , while the interpreter will translate the code one line at a time . (This is in lay man's terms, ofcourse)

Posted by CodeRed [send private reply] at May 07, 2002, 10:17:10 PM

A compiler processes the code and generates an executable file, it only needs to be done once and anytime you want to use the program you just run the executable. An interpreter processes the code during program execution, that is everytime you want to run the program, you must use the interpreter. Some languages are hybrids, like java. Java programs must be compiled but must also be run using an interpreter.

Posted by buzgub [send private reply] at May 08, 2002, 01:24:35 AM

There's no requirement that there only be one compiler (or interpreter) for each language, too. There's heaps of c compilers, but everyone uses the same perl interpreter.

Posted by diegoeskryptic [send private reply] at May 08, 2002, 03:48:05 PM

OK I got it now! Thanx...

Posted by unknown_lamer [send private reply] at May 09, 2002, 05:10:00 PM

"GCC, is another main compiler, but its for Linux. "

No, it can run just about everywhere. Look for DJGPP and cygwin (cygwin.com) for ports to Windows. GCC also runs on basically everything from AIX to Xenix. So saying that it is limited to the GNU/Linux system is a huge misunderstanding.

Posted by FatalDragon [send private reply] at May 09, 2002, 10:03:47 PM

True, but its the mian Linux compiler.

Posted by gian [send private reply] at May 10, 2002, 08:17:55 AM

No it is the main GNU compiler... so any GNU compatible OS will probably use GCC (in some form).

Posted by unknown_lamer [send private reply] at May 10, 2002, 02:01:44 PM

GCC is the compiler that ships with FreeBSD (I think it does with Open and Net as well, but I forgot) and Mac OS X. It is also (apparantly) widely used for embedded devices (notice what archs it supports, e.g. CRIS).

Posted by FatalDragon [send private reply] at May 10, 2002, 05:39:50 PM

Yes, its the main GNU compiler, but its also the main compiler used on Linux, well I guess the EGCS, but isnt it the same? And your right, its also used for FreeBSD, and ports for other OSs.

Posted by unknown_lamer [send private reply] at May 11, 2002, 01:40:09 PM

EGCS was a fork of GCC 2.7 and was merged back in 2.8 (or was it 2.8 and merged back in 2.9? I keep forgetting). EGCS was forked from GNU GCC because a lot of people were angry over how slowly GCC was progressing. The EGCS project was merged back into the main GCC project with the steering committee and other stuff. See http://gcc.gnu.org for a detailed explanation.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.