Mail Archives: djgpp/1998/09/14/15:15:27
"Brett Porter" <blp01 AT uow DOT edu DOT au> writes:
> As with every compiler I know of, GCC does not allow this. You have to put
> all of the functions in separate source files. All these will be compiled to
> .o files and the linker will leave out any .o files that are not referenced.
Turbo Pascal and Janus Ada compilers/linkers at least do eliminate
every unused data/code in the final EXE.
But these languages (Ada, TP) are modular and the linker can be
reliabily informed that such and such code in .o files won't be used.
> This is mostly relevant to libraries... if you are just writing a normal
> project, why do you write functions that you don't use? :)
When you have a graphics package, you are not expected to use every
routine in it, are you ?
--
Gautier
--------
Homepage: http://www.unine.ch/math/Personnel/Assistants/Gautier/Montmollin.html
Software: http://www.unine.ch/math/Personnel/Assistants/Gautier/Gaut_FTP.htm
- Raw text -