The proper case for D.
robert fraser
fraserofthenight at gmail.com
Sun Jun 21 16:13:34 PDT 2009
Walter Bright Wrote:
> Robert Fraser wrote:
> > Your explanation sounds likely, however it seems VS is discriminating on
> > the per-symbol level...?
>
> Let's say the C++ source file looks like:
>
> ----------------------------
> int foo() { ... }
> int bar() { ... }
> ----------------------------
>
> it is compiled and put into a library. Your program references foo().
> Pulling in the object module from the library that contains foo() also
> pulls in bar(), because bar() is in the same object module. If bar()
> references a bunch of other stuff, that gets pulled in, too.
>
> VS may contain some scheme to split a source file into multiple object
> modules which prevents this.
>
> Note that dmd will split a single source file into multiple object
> modules when you compile with -lib.
Ah, thanks for the explanation. I didn't understand it pulled in whole object files at once, though given that libraries are just archives of object files, I should have assumed.
More information about the Digitalmars-d
mailing list