Could someone suggest a compiler

Currently using Code::Blocks

Page 1 of 1

6 Replies - 1332 Views - Last Post: 01 September 2009 - 02:25 PM Rate Topic: -----

#1 diego_pmc   User is offline

  • D.I.C Addict

Reputation: 83
  • View blog
  • Posts: 565
  • Joined: 13-May 09

Could someone suggest a compiler

Posted 01 September 2009 - 12:22 PM

Not long ago I changed the compiler I was using from Dev-C++ to Code::Blocks. I just finished correcting all the syntax-related errors in my (relatively small) program, and when I looked at the executable I found that it had a staggering 2.44 MB, so I re-compiled an older project of mine to see if the problem is with my source, or with Code::Blocks. The old executable (compiled with Dev-C++) has just 569 kB while the re-compiled executable (with Code::Blocks) has 1.42 MB.

I like Code::Blocks a lot, since it's easy to use, compiles rather fast, it doesn't throw a lot of complicated options at you (like Visual C++), which to me, since I don't know what they mean, are quite annoying. So bottom line is that until now I liked Code::Blocks a lot, but it seems that it just uses too much hard drive space when it compiles.

Can someone suggest a similar compiler, but one that is more efficient when it comes to hard drive space? Again, I find Visual C++ too 'heavy weight' (and thus inefficient) for the level I am currently programming at, so I'd like to use something else if possible.

EDIT: And it should be for Windows. (Sorry trixt.er!)

This post has been edited by diego_pmc: 01 September 2009 - 12:37 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Could someone suggest a compiler

#2 trixt.er   User is offline

  • D.I.C Regular
  • member icon

Reputation: 53
  • View blog
  • Posts: 432
  • Joined: 28-September 08

Re: Could someone suggest a compiler

Posted 01 September 2009 - 12:28 PM

The GNU compiler based in Linux offers optimization level utilities and is fast. Get emacs.
Was This Post Helpful? 0
  • +
  • -

#3 horace   User is offline

  • D.I.C Lover
  • member icon

Reputation: 768
  • View blog
  • Posts: 3,832
  • Joined: 25-October 06

Re: Could someone suggest a compiler

Posted 01 September 2009 - 01:02 PM

Code::Blocks uses a more modern version of the GNU compiler and MingW libraries than DEV-C++ so some change in executable size would be expected, e.g. I compiled a C version of hello world and .exe file were Code::Blocks 15883 and DEv-C++ 15663 bytes. However, the difference in size you are getting does seem excessive. It is possible that you have different build options, for example different levels of optimisation or building the release version in DEV-C++ and the debug version in Code::Blocks.
Was This Post Helpful? 0
  • +
  • -

#4 Oler1s   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1397
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Could someone suggest a compiler

Posted 01 September 2009 - 01:30 PM

How about the fact that the CRT is getting statically linked in? You know that cout and fstream and all the fun things called the C++ standard library? Where is the code for all that coming from? It has to be somewhere, right?

VC++ by default, I believe dynamically links, while MinGW, which you would use with Dev-C++ and Code::blocks, statically links.
Was This Post Helpful? 0
  • +
  • -

#5 NickDMax   User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2255
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Could someone suggest a compiler

Posted 01 September 2009 - 01:42 PM

You can get a few version of the Borland compiler for free on the net (Borland 5.5 or BCB (borland C++ builder I believe). The Borland 5.5 is just command line tools and BCB has an IDE (I don't use it but it is there).

You can get MinGW (which is used by Code::Blocks, Dev++ and Eclipse -- although all three CAN use other compilers if you want).

You can use the compiler from visual studio (this is what I do -- I don't use the whole visual studio IDE since I rarely want the overhead of projects). So for example I use a text editor called Programmer's Notepad and the compilers (MinGW, Borland 5.5, BCB 6.0, Visual Studio 2008/2010) -- Nice thing about my setup is that this is also my development environment for Python, perl, Powershell, assembly, etc. The only language that I use that gets its own IDE is Java (because most java programs tend to span multiple files and benefit from the project structure).

As a moderator here this setup is quite nice and make it easy to copy/paste debug and test code from all the different forums here.
Was This Post Helpful? 0
  • +
  • -

#6 Plus   User is offline

  • D.I.C Regular
  • member icon

Reputation: 41
  • View blog
  • Posts: 414
  • Joined: 24-November 08

Re: Could someone suggest a compiler

Posted 01 September 2009 - 01:50 PM

when using a non-standard compiler .. it will make your program work with even errors !

it will make you happy for a while but not long ...

i recommend a standard compiler as G++, Borland or MVS's compiler
Was This Post Helpful? 0
  • +
  • -

#7 entro   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 18-January 09

Re: Could someone suggest a compiler

Posted 01 September 2009 - 02:25 PM

Try cygwin and use gcc, it's command line based and rather simple. It's how I prefer to compile my C code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1