From: AndrewJ Newsgroups: comp.os.msdos.djgpp Subject: Re: How to tell DJGPP to make a C program Message-ID: References: <8q5p19$bg7$1 AT riker DOT addcom DOT de> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 45 Date: Tue, 19 Sep 2000 10:50:21 GMT NNTP-Posting-Host: 24.42.120.18 X-Complaints-To: abuse AT home DOT net X-Trace: news3.rdc1.on.home.com 969360621 24.42.120.18 (Tue, 19 Sep 2000 03:50:21 PDT) NNTP-Posting-Date: Tue, 19 Sep 2000 03:50:21 PDT Organization: Excite AT Home - The Leader in Broadband To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Mon, 18 Sep 2000 20:47:02 +0200, "Thorsten Erdmann" 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."