473,395 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Downloaded Bloodshed devcpp, compiled the Hello example but the exe is half a megabyte!?

So I just downloaded Bloodshed devcpp, opened up the Hello example, compiled
it, no problems ..... well, except one - the exe is 474,990 bytes!
What's the secret to compiling small exes?
Thanks
Oct 29 '07 #1
30 3753
* Dave -Turner:
So I just downloaded Bloodshed devcpp, opened up the Hello example, compiled
it, no problems ..... well, except one - the exe is 474,990 bytes!
What's the secret to compiling small exes?
Thanks

This is the place to ask questions about Dev-C++:
http://sourceforge.net/forum/forum.php?forum_id=48211

--
Derek
Oct 29 '07 #2
mmk thanks .... but what c++ compilers are we allowed to ask questions about
here in comp.lang.c++ ?
Oct 29 '07 #3
On Oct 29, 8:26 am, "Dave -Turner" <n...@no.nowrote:
mmk thanks .... but what c++ compilers are we allowed to ask questions about
here in comp.lang.c++ ?
In this group concepts regarding the *The standard C++ language* are
discussed. If the answer to the question depends on idndividual
implementation/compiler/OS then this is probably not the appropriate
place to discuss them.

You can read more about comp.lang.c++ here :
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

-N

Oct 29 '07 #4
Dave -Turner wrote:
mmk thanks .... but what c++ compilers are we allowed to ask questions
about here in comp.lang.c++ ?
None. See the FAQ for a more detailed account on topicality.
There are exceptions. One case where asking about particular compilers is
fine is when two compilers disagree on legality or meaning of code. Then it
is topical to ask which (if any) compiler is right. In these cases, the
information about the compiler is by and large immaterial. Hint: if you can
replace the names of the compilers by X and Y and there still would be a
meaningful answer, it is probably topical.

Best

Kai-Uwe Bux
Oct 29 '07 #5
On Oct 29, 4:07 am, "Dave -Turner" <n...@no.nowrote:
So I just downloaded Bloodshed devcpp, opened up the Hello
example, compiled it, no problems ..... well, except one - the
exe is 474,990 bytes! What's the secret to compiling small
exes?
Getting the compiler and linker options right:-). It all
depends on the compiler, and also what you mean by the size of
the executable (file size, or what the command size says), but
all systems I've used have options controlling the amount of
debug information (symbols, etc) left in the executable, and
most also have options for linking more or less of the standard
library dynamically. Strip all of your symbols, and link
everything dynamically, and the resulting executable shouldn't
be too big. Thus, for example, with g++ on a Sparc, one simple
C++ version of hello world is 7.7KB when the libraries are
dynamically linked, but more than 3 MB when everything is linked
statically.

Be careful about this, though. File size is rarely that
important, and if you link dynamically, you have to ensure that
the necessary dll or so are present on the target machine where
the code is to run. And if you link statically, you have to
ensure that the version of the library you link is compatible
with the OS on the target machine. Under Unix, for example, I
generally link everything but the system libraries (libc, libm,
etc.) statically---the system libraries are bundled with the
system (and so sure to be present on all machines running the
OS), and tend not to be compatible between versions of the OS.
Under Windows, I'd statically link the system libraries as well,
since they aren't bundled (and individual versions do seem to
work under different versions of the OS). This results in much
larger executable files, but 1) all I have to do to install the
program so that it works is copy the single, executable file,
and 2) the versions of the library which I tested are the same
as those which the user uses. For third party libraries, you'll
want to decide on a per library basis: licensing issues will
frequently require the library to be present on the target
system anyway, and using dynamic linking may allow upgrading the
version (e.g. of the database) without requiring a new
deployment of your software.

Similarly, if you strip symbols, the executable you deliver will
be much smaller, but you'll have a much harder time figuring out
what went wrong if it crashes at the user site. (Again, the
criteria are different for Unix and Windows---Windows doesn't
normally give you a core dump on which you can do a post
mortum, so the lack of symbols may not be a problem.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 29 '07 #6
On Oct 29, 4:49 am, Kai-Uwe Bux <jkherci...@gmx.netwrote:
Dave -Turner wrote:
mmk thanks .... but what c++ compilers are we allowed to ask questions
about here in comp.lang.c++ ?
None. See the FAQ for a more detailed account on topicality.
There are exceptions. One case where asking about particular
compilers is fine is when two compilers disagree on legality
or meaning of code. Then it is topical to ask which (if any)
compiler is right. In these cases, the information about the
compiler is by and large immaterial. Hint: if you can replace
the names of the compilers by X and Y and there still would be
a meaningful answer, it is probably topical.
More generally, questions about specific compiler options, etc.,
are off topic, but there are often generalities which apply to
many different compilers, which are perfectly acceptable. Thus,
I have no idea what Bloodshed is as a compiler, and couldn't
begin to tell him what options he should be using, even if it
were on topic. But I know that generally, there are two things
that have a very large effect on the size of an executable; by
playing with the amount of debugging information in the
executable, and how much is dynamically linked, I can vary the
size of hello, world from 4.8KB to over 3MB with g++ under
Solaris. The exact sizes on other systems will be different,
but such ranges are typical. Telling him that he has to look
for the options of his compiler which control the amount of
debug information and what is linked statically or dynamically
is certainly on topic, as is telling him that there are a lot
more important considerations than just executable file size
which have to be taken into account.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 29 '07 #7
Ok well, I asked at the Bloodshed forum as suggested and although this issue
has been discussed somewhat there doesn't seem to be any apparent solution
to it other than 1) make sure debugging info isnt being included, and 2)
make sure Strip Executable in compiler options is turned on.
That managed to get the exe down to 263kb, but that's seemingly as small as
it'll get, so that forum seemed somewhat useless. I can make the same exe
using lcc in around 3kb.

But because I can't talk about DevCpp here I guess this newsgroup is equally
useless to ask for help. Perhaps you should rename it to something more
suitable, I can think of a few suggestions.
Oct 30 '07 #8
On 2007-10-30 02:56, Dave -Turner wrote:
Ok well, I asked at the Bloodshed forum as suggested and although this issue
has been discussed somewhat there doesn't seem to be any apparent solution
to it other than 1) make sure debugging info isnt being included, and 2)
make sure Strip Executable in compiler options is turned on.
That managed to get the exe down to 263kb, but that's seemingly as small as
it'll get, so that forum seemed somewhat useless. I can make the same exe
using lcc in around 3kb.
Just a though, might it be that the compiler you are using with
Bloodshed is unable to produce a smaller executable? All compilers are
not equal when it comes to generating code, so produces small code some
produces large, some fast, and some slow.
But because I can't talk about DevCpp here I guess this newsgroup is equally
useless to ask for help. Perhaps you should rename it to something more
suitable, I can think of a few suggestions.
This groups is very aptly named, it is not comp.lang.c++ compilers, or
comp.lang.c++.bloodshed, it is just comp.lang.c++ which reflects quite
well what we discuss here. Let us take a quick look at the components
for a while. The "comp" tells us that what is discussed is related to
computers in some why, the "lang" means that we discuss a computer
language, and the "c++" means that it is the c++ computer language we
are discussing. Had it been comp.c++ compilers might have been on topic
but that is not the case so they are not.

--
Erik Wikström
Oct 30 '07 #9

"Erik Wikström" <Er***********@telia.comwrote in message
news:Rh*****************@newsb.telia.net...
On 2007-10-30 02:56, Dave -Turner wrote:
>Ok well, I asked at the Bloodshed forum as suggested and although this
issue
has been discussed somewhat there doesn't seem to be any apparent
solution
to it other than 1) make sure debugging info isnt being included, and 2)
make sure Strip Executable in compiler options is turned on.
That managed to get the exe down to 263kb, but that's seemingly as small
as
it'll get, so that forum seemed somewhat useless. I can make the same exe
using lcc in around 3kb.

Just a though, might it be that the compiler you are using with
Bloodshed is unable to produce a smaller executable? All compilers are
not equal when it comes to generating code, so produces small code some
produces large, some fast, and some slow.
I'm simply using the default as-is installation of Bloodshed Dev-Cpp. If
you go to their site and download it now youll have exactly what i've got.
>But because I can't talk about DevCpp here I guess this newsgroup is
equally
useless to ask for help. Perhaps you should rename it to something more
suitable, I can think of a few suggestions.

This groups is very aptly named, it is not comp.lang.c++ compilers, or
comp.lang.c++.bloodshed, it is just comp.lang.c++ which reflects quite
well what we discuss here. Let us take a quick look at the components
for a while. The "comp" tells us that what is discussed is related to
computers in some why, the "lang" means that we discuss a computer
language, and the "c++" means that it is the c++ computer language we
are discussing. Had it been comp.c++ compilers might have been on topic
but that is not the case so they are not.
Well let's see .....
comp.* .... yes, I'm enquiring about a computer language, which is computer
related
comp.lang.* .... yes, again I'm enquiring about a computer language
comp.lang.c++ .... yes, I'm enquiring about a computer language, and yes
it's c++.

BUT NO.
So apparently my only fault was mentioning the word "Bloodshed", because
other than that it wouldve been "generic". <insert wanking notions here>

How about changing the name to
comp.lang.c++.dont.ask.we're.absolutely.bloody.use less ??? At least then
newcomers would know what this newsgroup is about - I wouldn't have bothered
wasting mine (or your) time if I had've known that this newsgroup was
useless when it comes to c++-related questions.

Oct 30 '07 #10
On 2007-10-30 11:02, Dave -Turner wrote:
"Erik Wikstré—£" <Er***********@telia.comwrote in message
news:Rh*****************@newsb.telia.net...
>On 2007-10-30 02:56, Dave -Turner wrote:
>>But because I can't talk about DevCpp here I guess this newsgroup is
equally
useless to ask for help. Perhaps you should rename it to something more
suitable, I can think of a few suggestions.

This groups is very aptly named, it is not comp.lang.c++ compilers, or
comp.lang.c++.bloodshed, it is just comp.lang.c++ which reflects quite
well what we discuss here. Let us take a quick look at the components
for a while. The "comp" tells us that what is discussed is related to
computers in some why, the "lang" means that we discuss a computer
language, and the "c++" means that it is the c++ computer language we
are discussing. Had it been comp.c++ compilers might have been on topic
but that is not the case so they are not.

Well let's see .....
comp.* .... yes, I'm enquiring about a computer language, which is computer
related
comp.lang.* .... yes, again I'm enquiring about a computer language
comp.lang.c++ .... yes, I'm enquiring about a computer language, and yes
it's c++.
No, you are asking about a compiler. A question about C++ would be "Why
does not my program print 'Hello world' when I run it." Your question
was "What's the secret to compiling small exes?", that is like asking
how to operate your dishwasher in a group discussing tableware.

--
Erik Wikström
Oct 30 '07 #11
On Oct 30, 4:02 am, "Dave -Turner" <n...@no.nowrote:
"Erik Wikström" <Erik-wikst...@telia.comwrote in message

news:Rh*****************@newsb.telia.net...


On 2007-10-30 02:56, Dave -Turner wrote:
Ok well, I asked at the Bloodshed forum as suggested and although this
issue
has been discussed somewhat there doesn't seem to be any apparent
solution
to it other than 1) make sure debugging info isnt being included, and 2)
make sure Strip Executable in compiler options is turned on.
That managed to get the exe down to 263kb, but that's seemingly as small
as
it'll get, so that forum seemed somewhat useless. I can make the same exe
using lcc in around 3kb.
Just a though, might it be that the compiler you are using with
Bloodshed is unable to produce a smaller executable? All compilers are
not equal when it comes to generating code, so produces small code some
produces large, some fast, and some slow.

I'm simply using the default as-is installation of Bloodshed Dev-Cpp. If
you go to their site and download it now youll have exactly what i've got.
But because I can't talk about DevCpp here I guess this newsgroup is
equally
useless to ask for help. Perhaps you should rename it to something more
suitable, I can think of a few suggestions.
This groups is very aptly named, it is not comp.lang.c++ compilers, or
comp.lang.c++.bloodshed, it is just comp.lang.c++ which reflects quite
well what we discuss here. Let us take a quick look at the components
for a while. The "comp" tells us that what is discussed is related to
computers in some why, the "lang" means that we discuss a computer
language, and the "c++" means that it is the c++ computer language we
are discussing. Had it been comp.c++ compilers might have been on topic
but that is not the case so they are not.

Well let's see .....
comp.* .... yes, I'm enquiring about a computer language, which is computer
related
comp.lang.* .... yes, again I'm enquiring about a computer language
comp.lang.c++ .... yes, I'm enquiring about a computer language, and yes
it's c++.

BUT NO.
So apparently my only fault was mentioning the word "Bloodshed", because
other than that it wouldve been "generic". <insert wanking notions here>

How about changing the name to
comp.lang.c++.dont.ask.we're.absolutely.bloody.use less ??? At least then
newcomers would know what this newsgroup is about - I wouldn't have bothered
wasting mine (or your) time if I had've known that this newsgroup was
useless when it comes to c++-related questions.
I think you're being too harsh. Kanze gave you an answer that
cut about 50% off the size. In general this group is far from
useless. In your particular case a clear answer hasn't popped
up yet. As someone else said, it may just be a problem with
the compiler. I advise being patient. If you don't figure anything
out in a week or two, I won't complain if you ask
again.

Brian Wood
Ebenezer Enterprises

Oct 30 '07 #12
On Oct 30, 11:02 am, "Dave -Turner" <n...@no.nowrote:
How about changing the name to
comp.lang.c++.dont.ask.we're.absolutely.bloody.use less ??? At least then
newcomers would know what this newsgroup is about - I wouldn't have bothered
wasting mine (or your) time if I had've known that this newsgroup was
useless when it comes to c++-related questions.
If you would have asked a question pertaining to standard C++, i.e.
the language itself, then you probably would have gotten textbook
answers. The question you are asking however, is about a very
specific IDE that is distributed with a specific compiler. This
is orthogonal to the language - the language stands independent
of this.

Refer to ...

http://www.parashift.com/c++-faq-lite/how-to-post.html [5.9]

.... to see exactly what and what you should not expect of this group.

The fact that either no one at bloodshed could help you, or you
could find help wrt. the bloodshed (or DevC++) compiler (I BTW.
think the compiler is g++, and there is a newsgroup for that),
has nothing to do with this newsgroup.

Perhaps try gnu.g++.help. Also, I suppose you have removed
the symbol table - the option is a linker option "-s". In other
words I suppose for "Dev C++" you would open the dialog
"Compiler Options" and add -s to the linker command line. You could
also go the the "Settings" tab and look at the options there (if
you have not done so).

Regards,

Werner



Oct 30 '07 #13

Erik Wikström wrote in message...
>
Just a though, might it be that the compiler you are using with
Bloodshed is unable to produce a smaller executable?
GCC used to make small EXEs, then there was some legal stink with microslut
and the EXE size exploded. ( I have no facts on this, it's scuttlebutt.
<G>).

I think there might be some info at gnu.org, if you look back far enough.

If you really need a small EXE, try GCC 2.95.2 (ancient, about the time of
the Roman empire. :-} (unreal, but the GNU/Linux still recommend 2.95.2 for
kernel building. Tons of errors to correct if you use newer compiler. Been
there, done that!)).

--
Bob R
POVrookie
Oct 30 '07 #14
On Oct 30, 6:02 am, "Dave -Turner" <n...@no.nowrote:
[snip]
How about changing the name to
comp.lang.c++.dont.ask.we're.absolutely.bloody.use less ??? At least then
newcomers would know what this newsgroup is about - I wouldn't have bothered
wasting mine (or your) time if I had've known that this newsgroup was
useless when it comes to c++-related questions.
Hee hee. Stamp your foot a little harder.

There's this thing called a FAQ. It gets posted
quite regularly here. Or you could do a search
for it on google groups.

In two minutes you could have found this:

http://www.bloodshed.net/faq.html

But nope! Your demands outrank all other
considerations. You must have your off-topic
blather respected.

I always do a google-groups search on anybody
who applies for a job at my company. It's often
quite useful.
Socks

Oct 30 '07 #15
"Dave -Turner" <no@no.nowrites:
Well let's see .....
comp.* .... yes, I'm enquiring about a computer language, which is computer
related
comp.lang.* .... yes, again I'm enquiring about a computer language
comp.lang.c++ .... yes, I'm enquiring about a computer language, and yes
it's c++.
You asked how to get a specific compiler to produce a smaller executable.
That's not a question about the language.

Accurately identifying the problem domain is a valuable skill for any prog-
rammer to have. Not only does it result in less conflict on groups such as
these, it also helps you find solutions on your own, without having to ask
for help to begin with.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Oct 30 '07 #16
And YES, I have read the FAQs. They were helpful to some degree - my 500kb
executable is now only 268kb.
But that is still ridiculously bloated for a "Hello world" console program.
And yes, I do have "-s" (ie. "Strip Executable") setting, and no I do not
have any debug info included. And yes, I do have "Best Optimization" setting
on. I've gone through all the compiler and linker settings but can't see
anything that would be bloating it out like this.

I can compile the same code in :LCC resulting in a ~3kb .exe so I think I'll
go back to that.... :-/

Even in Powerbasic - yes, a basic compiler, I can go into the IDE, type in
the following:
FUNCTION PBMAIN() AS LONG
STDOUT "Hello World"
END FUNCTION
.... and compile that in a matter of seconds and thats only ~7kb.


Oct 30 '07 #17
You asked how to get a specific compiler to produce a smaller executable.
That's not a question about the language.
It's a C++ compiler, but I didn't realise everyone here was so anal about
the C++ language being referenced with a C++ compiler (I'm sorry - I'm one
of those weird types who actually uses compilers when using the C++
language). My humble apologies, it's just that I've never come across a
newsgroup so petty as this before in all my years of usenet, but it does
quickly demonstrate how useless this newsgroup is so I thankyou for that -
it'll save me wasting my time again.

Oct 30 '07 #18
Dave -Turner wrote:
>You asked how to get a specific compiler to produce a smaller executable.
That's not a question about the language.
It's a C++ compiler, but I didn't realise everyone here was so anal about
the C++ language being referenced with a C++ compiler (I'm sorry - I'm one
of those weird types who actually uses compilers when using the C++
language). My humble apologies, it's just that I've never come across a
newsgroup so petty as this before in all my years of usenet, but it does
quickly demonstrate how useless this newsgroup is so I thankyou for that -
it'll save me wasting my time again.
Here's a suggestion. Ask yourself the following questions.

1. If the answer to your question is pretty much the same, regardless
of the language you use (i.e. Delphi, C++, VB) ... it's OT in
comp.lang.c++. Ask in a newsgroup dedicated to your platform, or in
comp.programming.*.

2. If the answer to your question would not make sense on a different
platform (i.e. Windows vs. Linux) or compiler (i.e. g++ vs. VC++), ...
it's OT in comp.lang.c++. Ask in a newsgroup dedicated to your platform.
Oct 30 '07 #19
Dave -Turner wrote:
And YES, I have read the FAQs. They were helpful to some degree - my 500kb
executable is now only 268kb.
But that is still ridiculously bloated for a "Hello world" console
program. And yes, I do have "-s" (ie. "Strip Executable") setting, and no
I do not have any debug info included. And yes, I do have "Best
Optimization" setting on. I've gone through all the compiler and linker
settings but can't see anything that would be bloating it out like this.
If I just compile (no optimization, no fancy options) hello world with g++
under Linux, I get an executable of size 8K. If I strip it, it becomes 6K.
If I include debug info, it grows to 55K. The only way I can really bloat
it is by linking statically.
[snip]
Best

Kai-Uwe Bux
Oct 31 '07 #20
"Dave -Turner" <no@no.nowrites:
>You asked how to get a specific compiler to produce a smaller executable.
That's not a question about the language.

My humble apologies, it's just that I've never come across a
newsgroup so petty as this before in all my years of usenet
All usenet groups have a charter, and being strict about following the
chartered topic is the norm on usenet; the alternative is a chaotic mess
that really *would* be useless.

Frankly, your lack of knowledge about usenet culture casts a lot of doubt on
your claim to have been using usenet for many years.
>, but it does
quickly demonstrate how useless this newsgroup is
Grow up. It's not our fault that you don't know the difference between a
programming language and a compiler.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Oct 31 '07 #21
Dave -Turner wrote:
>You asked how to get a specific compiler to produce a smaller executable.
That's not a question about the language.
It's a C++ compiler, but I didn't realise everyone here was so anal about
the C++ language being referenced with a C++ compiler (I'm sorry - I'm one
of those weird types who actually uses compilers when using the C++
language). My humble apologies, it's just that I've never come across a
newsgroup so petty as this before in all my years of usenet, but it does
quickly demonstrate how useless this newsgroup is so I thankyou for that -
it'll save me wasting my time again.
Close the door on your way out, and stay out.
Oct 31 '07 #22
Here's a suggestion. Ask yourself the following questions.

rofl. Sorry I didn't go through the 25-point-checklist before I posted a C++
question about C++.
Oct 31 '07 #23
rofl.
Once again I _apologise_ for asking a C++ question in comp.lang.c++, and
again I didn't realise you guys were so ANAL about C++ questions

Oct 31 '07 #24
Close the door on your way out, and stay out.
Thanks for proving my point about how ANAL you guys are.
Oct 31 '07 #25
If I just compile (no optimization, no fancy options) hello world with g++
under Linux, I get an executable of size 8K. If I strip it, it becomes 6K.
If I include debug info, it grows to 55K. The only way I can really bloat
it is by linking statically.
Ahh, must be a Windows Bloodshed problem then.
Oct 31 '07 #26
On Oct 30, 6:54 pm, "BobR" <removeBadB...@worldnet.att.netwrote:
Erik Wikström wrote in message...
Just a though, might it be that the compiler you are using
with Bloodshed is unable to produce a smaller executable?
GCC used to make small EXEs, then there was some legal stink
with microslut and the EXE size exploded. ( I have no facts on
this, it's scuttlebutt. <G>).
I don't know about this particular case, but... Whether you link
dynamically or statically has a very big impact on the size of
the executable file. If you link dynamically, you must
distribute the dynamic components with your program. That can
have very important legal implications. In both directions: if
you statically link with a library under GPL (not LGPL), then
you may find your own code "tainted"; if you deliver the library
as a separate product (i.e. the way Sun Studio delivers xemacs),
you might not have the problem, even if you link dynamically to
it at runtime.
I think there might be some info at gnu.org, if you look back
far enough.
If you really need a small EXE, try GCC 2.95.2 (ancient, about
the time of the Roman empire. :-} (unreal, but the GNU/Linux
still recommend 2.95.2 for kernel building. Tons of errors to
correct if you use newer compiler. Been there, done that!)).
As a general rule: the error rate goes down as a product ages.
The most reliable versions are those at the end of life cycle.
(G++ 3.0 was a completely new compiler.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 31 '07 #27

James Kanze wrote in message...
I didn't give an
answer to that for the simple reason that I don't know the
Bloodshed compiler, ......
Bloodshed is Dev-C++ IDE, and defaults to GCC(MinGW).
So, you *do* know the compiler! <G>

Dev-C++ IDE: http://www.bloodshed.net/
--
Bob R
POVrookie
Oct 31 '07 #28
On Oct 31, 8:20 pm, "BobR" <removeBadB...@worldnet.att.netwrote:
James Kanze wrote in message...
I didn't give an
answer to that for the simple reason that I don't know the
Bloodshed compiler, ......
Bloodshed is Dev-C++ IDE, and defaults to GCC(MinGW).
So, you *do* know the compiler! <G>
So all he has to do is go into a command window or his make
file, and add the options -s -dynamic, and the size should
shrink:-). (Of course, he'll have to ask in a Bloodshed
specific group about how to do this from the IDE. The only
IDE's I know are gvim/bash/GNU make and emacs/bash/GNU make.
They're also the ones I'd recommend for any professional
development, since they are 1) extremely powerful, and easy to
use once you know them, and 2) totally portable---I use the same
IDE under Solaris, Linux and Windows. On the down side, that
"once you know them" is a pretty big chunk to bite off when
you're first starting.)

I might add another thought: I'm not too familiar with the
platform, but from what I've been told, under Windows, you have
two types of applications: console applications and windows
applications. I don't know exactly how that works, but if you
link all of the GUI stuff into a windows application, it's going
to be very, very big, even if you don't actually use it. As a
sanity check, if he's under Windows, he should ensure that he's
generating a console application, just in case.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Nov 1 '07 #29
"James Kanze" writes:

More importantly, of course, one might ask: who cares? About
the size of hello, world, I mean. Typically, the size will be
something along the lines of n*k1 + k2, where n is the size of
the sources. If the problem is k1---if hello, world is so big
because the compiler is generating a 100 KB or so per line of
code, he has a real problem, since realistic applications
(anything from 50KLoc up) won't even fit on the disk. But IMHO,
that's unlikely. It's more likely a case of k2 being
excessively large---200K or more. Which means that the size
won't grow excessively as the application grows.

Aha! Now I understand. It's like a lawyer who charges a $50K retainer for
defending a double parking case, but only charges $25 an hour. It's all so
simple and sensible ...
Nov 1 '07 #30
On Oct 30, 5:17 pm, Sherman Pendley <spamt...@dot-app.orgwrote:
"Dave -Turner" <n...@no.nowrites:
You asked how to get a specific compiler to produce a smaller executable.
That's not a question about the language.
My humble apologies, it's just that I've never come across a
newsgroup so petty as this before in all my years of usenet

All usenet groups have a charter, and being strict about following the
chartered topic is the norm on usenet; the alternative is a chaotic mess
that really *would* be useless.

Frankly, your lack of knowledge about usenet culture casts a lot of doubt on
your claim to have been using usenet for many years.
, but it does
quickly demonstrate how useless this newsgroup is

Grow up. It's not our fault that you don't know the difference between a
programming language and a compiler.

sherm--

--
Web Hosting by West Virginians, for West Virginians:http://wv-www.net
Cocoa programming in Perl:http://camelbones.sourceforge.net
i think you will need something like UPX it will compress your exe and
if you need more and more
do optimization to your code like remove debug information and use C
"stdio.h" instead of any C++ standard library "iostream.h" that will
give you assembly programs size

the UPX is free and open-source and work in both windows and linux
http://upx.sourceforge.net/

Nov 1 '07 #31

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Developwebsites | last post by:
I have tried out these C++ compilers: Watcom 11.0c - simply does not work. now they bundled fortran with c++ but it just doesnt install on my pc. digi-mars DOS - good, fast, small. however, no...
2
by: PointNot | last post by:
I'm coding in Dev C++ by bloodshed my questions are.... I want to learn to create GUI windows interfaces, can I do it in here. I've never learned the visual aspect of C++ yet, and would like to...
1
by: Jose Garcia | last post by:
Hi... I am wrinting a win32-aplicattion that not uses classes. I use stdio.h and iostream for example, and, the operators new & delete for memory. Then... Is "licit" to mix c & c++ code,...
0
by: bob | last post by:
I'm using Bloodshed Dev-C++, and I'm getting ready to distribute a program I made with it. Does anyone know how to change the icon of the program? I'm not sure how resources work in Bloodshed,...
6
by: PCHOME | last post by:
Hi! I am looking for a good free IDE C Compiler. Dose any have experience on using them? Which is better? Bloodshed C or Miracle C? Or anyother free IDE C Compiler you like to recomend? ...
4
by: John Smith | last post by:
My program includes a use of strstr(). It looks like this: if(strstr(*str1, *str2) ........... After compiling the code, I opened the program with a hex editor (this is on Windows). Sure...
6
by: Earl Teigrob | last post by:
I am writing an application that dynamically loads user controls at run time based on user options. I would like to give my users the ability to build their own user controls and add them to my...
1
by: Jim Langston | last post by:
I'm trying to compile some source code to interface LUA into C++. When I compile in MSVC++ Express 2008, however, I get the error (among others): ....\luastate.h(129) : error C2027: use of...
40
by: castironpi | last post by:
I'm curious about some of the details of the internals of the Python interpreter: I understand C from a hardware perspective. x= y+ 1; Move value from place y into a register Add 1 to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.