Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,185 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,389 people online right now. Registration is fast and FREE... Join Now!




What compiler?

 
Reply to this topicStart new topic

What compiler?

tortillaboy05
4 Jul, 2008 - 08:09 PM
Post #1

New D.I.C Head
*

Joined: 2 Jul, 2008
Posts: 20


My Contributions
The only one I've used is Dev-C++ since it's the one my professor told us to use when I took my first C/C++ class. I have a shell to a linux server at my school but I don't really feel like learning how to use it since I already know Dev fairly well. I should probably learn how to use it but don't really have the desire to. Anyways, what's your favorite compiler?
User is offlineProfile CardPM
+Quote Post

Cerolobo
RE: What Compiler?
4 Jul, 2008 - 08:13 PM
Post #2

D.I.C Regular
Group Icon

Joined: 5 Apr, 2008
Posts: 440



Thanked: 31 times
My Contributions
GNU Compiler Collection for me.

As a side note, Dev-C++ is NOT a compiler. It's just a glorified text editor, that wraps around the MinGW compiler, which is a GCC port.
User is offlineProfile CardPM
+Quote Post

tortillaboy05
RE: What Compiler?
4 Jul, 2008 - 09:09 PM
Post #3

New D.I.C Head
*

Joined: 2 Jul, 2008
Posts: 20


My Contributions
Okay I see. My prof always called it a compiler :\ . Thanks for setting me straight.
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: What Compiler?
4 Jul, 2008 - 10:02 PM
Post #4

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,035



Thanked: 82 times
Dream Kudos: 1175
My Contributions
I am not positive these are compilers, but I have used Emacs and Visual C++ in the past.
User is offlineProfile CardPM
+Quote Post

tortillaboy05
RE: What Compiler?
4 Jul, 2008 - 11:33 PM
Post #5

New D.I.C Head
*

Joined: 2 Jul, 2008
Posts: 20


My Contributions
Cerelobo, can you explain a little bit more in detail what GCC actually does? Is it also a text editor or simply a compiler and you use a different program to edit your code?

I was obviously confused by thinking Dev was actually a compiler. I'd just like a little more insight on the topic. I know that compilers translate from a high level language into a lower level but beyond that it's a little hazy. The classes I've taken never really went into detail on the subject. Thanks.
User is offlineProfile CardPM
+Quote Post

Cerolobo
RE: What Compiler?
5 Jul, 2008 - 12:46 AM
Post #6

D.I.C Regular
Group Icon

Joined: 5 Apr, 2008
Posts: 440



Thanked: 31 times
My Contributions
GCC is just a compiler. To be more specific, it's a collection of compilers. Namely, it can take C, C++, Objective-C, Fortran, Java, and Ada code, and convert it to machine code.

GCC does not include a text editor or similar; however, GNU does provide a variety of tools to programmers. This includes Emacs, which is basically a extremely complied text editor.

All of the C/C++ compilers that I know of, are just console programs. Programs like Dev-C++, Visual Studio, Code::Blocks, ect... just provides a way to interface with the compiler. Most of the time, I find IDEs to just complicate things; however, they can be great from some of the advanced features, like debugging.

To actually compile a program, all you really have to do, is type something like this into the command prompt (assuming the compiler is in your root)
gcc <SOURCE FILE.c>

IDEs will basically just build a list of the source files, and feed them to the compiler, along with a variety of switches and options.

There are also Linkers. Most modern compilers have linkers built in, which greatly simply the compilation progress; however, they still have two very distinct jobs. Once the compiler converts the source code to machine code, it's the linkers job to kinda "paste", or "link" all that code together. This is important, since you can't always compile a entire program from the ground up. IE, when you write a program, you don't have to compile the standard C/C++ libraries, or the OS specific code.

You can read more about compilers here
http://en.wikipedia.org/wiki/Compiler
User is offlineProfile CardPM
+Quote Post

tortillaboy05
RE: What Compiler?
5 Jul, 2008 - 08:50 AM
Post #7

New D.I.C Head
*

Joined: 2 Jul, 2008
Posts: 20


My Contributions
Thanks for the info smile.gif.
User is offlineProfile CardPM
+Quote Post

greatdragon
RE: What Compiler?
5 Jul, 2008 - 05:54 PM
Post #8

New D.I.C Head
*

Joined: 8 Nov, 2006
Posts: 22


My Contributions
tortillaboy05: Visual Studio 2008 is a fantastic piece of kit (especially if you use it with visual assist x) - excellent IDE with a fantastic debugger
User is offlineProfile CardPM
+Quote Post

tortillaboy05
RE: What Compiler?
6 Jul, 2008 - 11:05 AM
Post #9

New D.I.C Head
*

Joined: 2 Jul, 2008
Posts: 20


My Contributions
I'll have to look into it, thanks guys smile.gif
User is offlineProfile CardPM
+Quote Post

captainhampton
RE: What Compiler?
7 Jul, 2008 - 11:12 AM
Post #10

Jawsome++;
Group Icon

Joined: 17 Oct, 2007
Posts: 518



Thanked: 2 times
Dream Kudos: 825
My Contributions
Again, as stated above Dev-C++ is not a compiler, however I know what you are trying to say. As you progress through programming the programs you write tend to get more and more bulky/complex. In my experience handling bigger projects is Microsoft Visual Studio is a bit more friendly than bloodshed although still very good. Now is the time to at least familiarize yourself with Visual Studio seeing as it is quite standard
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 11:30AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month