www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/21/06:29:35

Sender: crough45 AT amc DOT de
Date: Mon, 21 Apr 1997 11:24:17 +0100
From: Chris Croughton <crough45 AT amc DOT de>
Mime-Version: 1.0
To: nab26 AT cam DOT ac DOT uk
Cc: djgpp AT delorie DOT com
Subject: Re: Reduce .exe file size
Message-Id: <97Apr21.122234gmt+0100.21891@internet01.amc.de>

Ali Bharmal wrote:

> If you can help (or I missed the obvious) then please email me

Yes, you missed the obvious <g>.  You declared the functions
as 'static', this means that the names are local to the module 
and are never seen by the linker.  But it's the linker which you 
have to tell "I've got my own versions of these functions, so
don't load the library ones"; since it never sees your versions
it goes ahead and loads the library ones as usual.

Just take out the word 'static' from the dclarations and it will
all work (barring other problems, of course!).

(Hmm, you're using C++.  I'm not certain, but you may need to 
replace 'static' with 'extern "C"', so they become:

extern "C" void   __crt0_load_environment_file(char *_app_name);

etc.  Try it and see.  And please let me know which one works...)

Chris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019