#pragma comment (lib, ...)

Paulo Pinto pjmlp at progtools.org
Wed Oct 10 06:45:30 PDT 2012


On Wednesday, 10 October 2012 at 13:23:57 UTC, Manu wrote:
> On 10 October 2012 15:42, Jacob Carlborg <doob at me.com> wrote:
>
>> On 2012-10-10 13:15, Iain Buclaw wrote:
>>
>>  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.
>>>
>>
>> I agree, I think a package manager together with a build tool 
>> should be
>> used instead.
>
>
> None of those things actually embody the information about the
> relationship, nor can they. The source code does, and nothing 
> else.
> Features that imply the dependency may (and often are) be 
> disabled at
> compile time.
> I rather like that the compiler is able to put a note in the 
> object file
> that it depends on a particular lib, because it does.
> I'm not sure how a package manager helps... What is a package 
> manager? ;)
> I'd like to hear some reasons why that is a bad or undesirable 
> thing, or is
> this just an opinion?


This only works if it is part of the language definition.

In C and C++ case I am usually against it, because I favour 
portability over dependencies to a specific compiler vendor. Many 
years of writing multi-platform code do leave some scars.

As for D, if this can be made part of the language then I see no 
big reason against it.

--
Paulo



More information about the Digitalmars-d mailing list