#pragma comment (lib, ...)
Manu
turkeyman at gmail.com
Wed Oct 10 04:26:13 PDT 2012
On 10 October 2012 14:15, Iain Buclaw <ibuclaw at ubuntu.com> wrote:
> On 10 October 2012 09:31, Manu <turkeyman at gmail.com> wrote:
> > Percect, thanks!
> >
> >
> > On 10 October 2012 11:27, Walter Bright <newshound2 at digitalmars.com>
> wrote:
> >>
> >> On 10/10/2012 1:22 AM, Manu wrote:
> >>>
> >>> Does D support some sort of #pragma lib?
> >>
> >>
> >> Yes:
> >>
> >> pragma(lib, "mylib.lib");
> >
> >
>
> NB: GCC has no such equivalent, and IMO libraries should be specified
> during the linking step. Such information simply doesn't belong inside
> a source file as a source file can be compiled or assembled even
> without a linking stage.
>
Really? Is it an MS thing? I'm amazed the other compilers haven't adopted
that in the last 10 years or whatever.
It just leaves a note in the object file that the linker happens to find
and apply later. I don't see any problem with it. It's the source file has
the dependency on the lib, it's annoying to manually manage that externally
when the dependency is already explicit in the code, and can be easily
recorded in the object file.
I think D's modules make this relationship even stronger, and it's a shame
it's not a standard part of D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121010/7018b43d/attachment-0001.html>
More information about the Digitalmars-d
mailing list