Linking Error (WS2_32.LIB)
Vladimir Panteleev
vladimir at thecybershadow.net
Fri Nov 11 04:29:32 PST 2011
On Fri, 11 Nov 2011 04:12:43 +0200, Walter Bright
<newshound2 at digitalmars.com> wrote:
> On 11/10/2011 5:10 PM, Nick Sabalausky wrote:
>> Isn't this a bug that the compiler accepted it and the error didn't get
>> raised until it got all the way to the linker? Doesn't the compiler
>> normally
>> catch that before it gets to the linker?
>
> No. The reason is the implementation may be in another .obj file known
> only to the linker.
I can't see how that makes sense, even with the above (un-idiomatic?)
idea. The compiler should not emit references to *abstract* methods.
I think this looks like a case of class attributes not affecting methods:
"Address" is declared as an abstract class, but the compiler doesn't
realize that its methods are abstract too. They are simply declared as
method declarations without a body.
This is similar to another old bug (now fixed, I believe), when methods of
"final" classes were still implicitly virtual.
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d
mailing list