Mail Archives: djgpp/2000/09/19/07:01:32
On Mon, 18 Sep 2000 20:47:02 +0200, "Thorsten Erdmann"
<thorsten DOT erdmann AT gmx DOT de> wrote:
>I have written an application which only use C commands, no C++. How can I
By what do you mean "C commands"? Do you mean it's C code?
>tell the compiler/linker to leave out all that C++ stuff. My application
When you use GCC to compile your application, it only compiles in C mode,
unless you add certain switches to instruct it to compile C++ code.
>gets very big, nearly 800K
GCC includes all sorts of symbol information that you must explicitly remove
from the executable when linking it, or afterwards. Add the '-s' command-line
option to your linker command, or use 'strip.exe' to remove it after linking.
> and I often get Out of memory errors during launching of it. So I hope to get
>it smaller that way.
This is strange. Unless you're running this on a system with no extended
memory (ie a 1MB system), I can't imagine this happening except through errors
in your code. Please note that just because the executable is large on disk,
this may have no bearing on the load image size (as I said, it's symbol
information and such for debugging purposes).
>Okay, I can compress it, but the decompressing on startup is very slow on
>the target 486 system. Any idea how to decrease the size of the executable?
See above. What compressor are you using on the executable?
>und tschüß
My memory has gone foggy and I can't remember all those early morning Deutsch
classes I took in high school. und is and, but tschüß?? I thought it was one
form of saying goodbye. Care to refresh my memory? :)
--
AndrewJ
"You can choose a ready guide in some celestial voice,
If you choose not to decide, you still have made a choice.
You can choose from phantom fears, and kindness that can kill,
I will choose a path that's clear... I will choose freewill."
- Raw text -