Required to link windows header modules (?)

Sean Kelly sean at f4.ca
Sun Jun 11 12:55:18 PDT 2006


Bruno Medeiros wrote:
> Sean Kelly wrote:
>> Derek Parnell wrote:
>>> On Mon, 12 Jun 2006 00:31:42 +1000, Bruno Medeiros 
>>> <brunodomedeirosATgmail at SPAM.com> wrote:
>>>
>>>> Sean Kelly wrote:
>>>>>  This would actually address a problem I noticed with Build in that 
>>>>> it isn't able to detect if a module is a "header" module and will 
>>>>> compile and link the code in anyway, which produces "previous 
>>>>> definition different" errors at link time.
>>>>>   Sean
>>>>
>>>> Hum, Have you used build exclusions (option -X) in order not to 
>>>> compile and link a module?
>>>>
>>>
>>> I think that the best option for now is to use
>>>
>>>   version(build) pragma(nolink);
>>>
>>> This will ensure that the file containing this pragma is not compiled 
>>> or linked.
>>
>> Yup.  This is what I've been doing.
> 
> Then what you meant about Build "isn't able to detect if a module is a 
> "header" module" ?

It isn't able to by itself--you have to tell it.  And while I'm not 
certain DMD could do better, I'd like to believe so.  That was my only 
point.  That in the long term it may be more useful to have such 
features built directly into the compiler.  In my brief experience with 
Build it's a darn sight better than generating C-style libraries.  And I 
suspect it will get around the template linking issues I've run into to 
boot.


Sean



More information about the Digitalmars-d-bugs mailing list