[Coco] Re: creatdsk.c source
Bob Devries
bdevries at gil.com.au
Sat Dec 24 16:03:42 EST 2005
manny, Microware C, the string functions are part of the C standard library,
so the executable doesn't get bigger from calling a string function. Only if
you call a function from another lib, will it include it, and yes, it does
include the complete lib.
--
Regards, Bob Devries, Dalby, Queensland, Australia
Isaiah 50:4 The sovereign Lord has given me
the capacity to be his spokesman,
so that I know how to help the weary.
website: http://www.home.gil.com.au/~bdevasl
my blog: http://bdevries.invigorated.org/
----- Original Message -----
From: "Mannequin*" <mannslists at invigorated.org>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Sunday, December 25, 2005 4:29 AM
Subject: Re: [Coco] Re: creatdsk.c source
> tim lindner wrote:
>> Mannequin* <mannslists at invigorated.org> wrote:
>
>>>In Microware C, you didn't have to include string.h when you used the
>>>string manipulation functions? Wouldn't that have added to the
>>>executables size with those (and other) functions compiled in and not
>>>being used?
>>>
>>>Anyone want to explain this for me?
>>
>> Header files don't add to the executable size becuse they (usually)
>> don't include any executable code. They usually only include
>> declarations. Sometime they can include static data, but it is usually
>> tiny. string.h doesn't contain any static data.
>>
>> Only calling functions defined in a header file will cause the linker to
>> add the code that implements the function.
>
> I knew that they only contained prototypes and declarations, etc. But
> what I was confused about was what the linker did with that information.
> I guess I forgot that it only adds the code that you use, because I was
> under the impression that it included the whole library.
>
> Thanks for the clarification. :)
> -M.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.7/214 - Release Date: 23/12/2005
>
>
More information about the Coco
mailing list