How does pragma(lib) work?

Robert Clipsham robert at octarineparrot.com
Sat Aug 27 09:10:59 PDT 2011


On 27/08/2011 16:59, dsimcha wrote:
> When I add the directive:
>
> pragma(lib, "foo");
>
> to a file called "bar.d" and then do:
>
> dmd -c bar.d
>
> does the object file bar.o or bar.obj contain a directive that reflects
> the pragma, or does pragma(lib) only work when compiling and linking in
> one step, e.g. dmd bar.d?

pragma(lib) only works with one step compilation - it's useless if you 
want one-at-a-time compilation, hence why rebuild and other tools had 
pragma(link).

-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list