Thread: Program size problem

  1. #16
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    That means Dev-C++ 4 is much better than Dev-C++ 4.9.9.2!
    That's why I use it.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #17
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by laserlight
    That's unfortunate, but at this point and in this case it is normal. Read the MinGW FAQ on "Why is my C++ binary so large?", since Dev-C++ uses the MinGW port of GCC by default. If after using strip the executable size is still too large, you may consider using UPX.


    But Dev-C++ 4, aside from being outdated itself, uses an outdated compiler set.
    UPX and strip both make programs from 450Kb-s to 250Kb-s.

  3. #18
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    So looks like I'm going over to Dev-C++ 4!

  4. #19
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    The only thing that annoys me about Dev-C++ 4 is that you can only compile projects.

  5. #20
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Well I tested the Dev-C++ 4 and I always get an error: Error in resource file

  6. #21
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Never mind, I found the problem. It made a resource file:
    Code:
    500 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "C:/PROGRAMS/DEV-C++/Icon/MAINICON.ICO"
    Problem was that I didnt have Icon folder in my Dev-C++ folder.

  7. #22
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    That means Dev-C++ 4 is much better than Dev-C++ 4.9.9.2!
    No, it doesnt. As an IDE, Dev-C++ 4.9.9.2 is better than Dev-C++ 4. The compiler it uses by default, the MinGW port of GCC 3.4.2, is newer and hence updated to the standards compared to the MinGW port of GCC 2.95, which Dev-C++ 4 uses. It isnt the IDE, but the compiler set that is causing this size increase. I dont understand why exactly, but if you read the FAQ that I linked to, it is probably something legal.

    But unless you have a special need to worry about executable size, this shouldnt be much of a problem since the executable size penalty is only incurred once. This means that doubling the code in a hello world program isnt going to double the executable size - so for more complex programs, the size penalty becomes less severe.

    UPX and strip both make programs from 450Kb-s to 250Kb-s.
    You should use strip first, and then UPX. The resulting executable should be under 100 KB, in my case for a hello world program it is around 74 KB.

    So looks like I'm going over to Dev-C++ 4!
    As I said, for the most part, executable size generated isnt everything. It is your choice in the end, but you should realise that you'll be using an outdated IDE where a new and improved one is available, and you'll be using an outdated compiler set that may hinder your development in the long run.
    Last edited by laserlight; 09-19-2005 at 03:31 AM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. char Handling, probably typical newbie stuff
    By Neolyth in forum C Programming
    Replies: 16
    Last Post: 06-21-2009, 04:05 AM
  2. Problem in getting size of a window
    By axr0284 in forum Windows Programming
    Replies: 3
    Last Post: 02-22-2005, 06:15 PM
  3. Replies: 11
    Last Post: 03-25-2003, 05:13 PM
  4. Console Program Problem
    By Breach23 in forum C++ Programming
    Replies: 3
    Last Post: 10-19-2001, 12:35 AM