News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Simple Static Library

Started by dedndave, November 30, 2010, 01:44:53 AM

Previous topic - Next topic

japheth

Quote from: Vortex on December 13, 2010, 06:46:34 PM
No any problem with Bogdan's reply. He's correct.

Hm ... I have problems with the reply.

The first is somewhat technically. There is ONE 'No' in the reply, but there were THREE questions in the target post. Worse, the third question is not really suited for a Yes/No response:

Quote
If i have all my functions in one .asm file and its compiled to a single .obj file and then converted to a .lib file, when i link it does the program linking/using it take all the functions over - even ones not used? NO.

Im wondering in relation to this if it would be better to create seperate files for each function, have then compiled to .obj files and converted to one .lib file. Would that be any different? NO

would the program using the .lib take all the code over to use or just functions that are used by the program? NO

My answers would be:

1. Yes
2. Yes
3. The latter.

redskull

I'm out of my league here, but I also thought that a linker includes the entire OBJECT from a library, not just the symbol.  I would think it would have to, as it doesn't really know the length of a function.  So yes, better to have many OBJ files in your lib, one for each function.

-r
Strange women, lying in ponds, distributing swords, is no basis for a system of government

fearless

Thanks for taking the time to look into my queries, much appreciated.
Ć’earless

Vortex

#33
Hi japheth,

QuoteHm ... I have problems with the reply.

It's not so difficult to guess. Probably, Bogdan was targetting this phrase to reply :

Quotewould the program using the .lib take all the code over to use or just functions that are used by the program?