Author Topic: Using Too Much Hard Drive Spce  (Read 2917 times)

Offline diego_pmc

  • Single posting newcomer
  • *
  • Posts: 9
Using Too Much Hard Drive Spce
« on: September 01, 2009, 09:59:24 pm »
Hi there,
I recently made a post over a dreamincode.com about the amount of hard drive space Code::Blocks-compiled executables use. Here's a quote from my post:
Quote
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.

So, I said in that post, I like Code::Blocks a lot, but it just uses too much hard drive space, so I figured maybe I should post my complaints here hoping that they might one day get fixed. :-)

Online stahta01

  • Lives here!
  • ****
  • Posts: 6640
    • My Best Post
Re: Using Too Much Hard Drive Spce
« Reply #1 on: September 01, 2009, 10:10:44 pm »
What compiler and version are you using?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline diego_pmc

  • Single posting newcomer
  • *
  • Posts: 9
Re: Using Too Much Hard Drive Spce
« Reply #2 on: September 01, 2009, 10:17:32 pm »
Version is 8.02 and compiler is MinGW.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12006
    • Travis build status
Re: Using Too Much Hard Drive Spce
« Reply #3 on: September 01, 2009, 10:39:23 pm »
Hello,

1. Codeblocks is not a compiler but an IDE (integrated development environment) the compiler is gcc or something else you are using
2. What is the configuration you're building Debug or Release:
2.1. Debug builds produce bigger executables
2.1.1. Because the debug info is embedded in the exe
2.1.2. If there is heavily templated code (boost, stl) the optimizer have not removed the unneeded things brought in by the meta-programming techniques used.
3. If you're using the Release target, you can specify the -s (strip executable, there is config option in the compiler tab), this one removes any removable symbols, so it minimizes the size of the exe.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline diego_pmc

  • Single posting newcomer
  • *
  • Posts: 9
Re: Using Too Much Hard Drive Spce
« Reply #4 on: September 02, 2009, 09:34:56 am »
2. What is the configuration you're building Debug or Release:
2.1. Debug builds produce bigger executables
2.1.1. Because the debug info is embedded in the exe
2.1.2. If there is heavily templated code (boost, stl) the optimizer have not removed the unneeded things brought in by the meta-programming techniques used.
Ah, sorry about that. I was compiling just a debug build I didn't know what Debug and Release meant so I didn't just left them as they were by default. The exe has just 418 KB now. Thanks and sorry again.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Using Too Much Hard Drive Spce
« Reply #5 on: September 02, 2009, 11:01:18 am »
Ah, sorry about that. I was compiling just a debug build I didn't know what Debug and Release meant so I didn't just left them as they were by default. The exe has just 418 KB now. Thanks and sorry again.

Would be nice if you can post that at dreamincode.com too, so that people know that it is not C::B that leads to this issue.