Class inheritance bug
Steven Schveighoffer
schveiguy at yahoo.com
Fri Nov 11 13:06:38 PST 2011
On Fri, 11 Nov 2011 15:28:41 -0500, Tobias M. <tobias.m at onlinehome.de>
wrote:
> No, this is seriously a bug. I tried around to get it linked correctly
> but kept failing. So then i tried to find a general example and here it
> is:
> ---------test.d---------
> module test;
> abstract class Foobar {
> this(string arg) {
> // do sth.
> }
> }
> class Blub : Foobar {
> this(string arg) {
> super(arg);
> // do sth.
> }
> }
> ---------END---------
> Compiling on Windows7(32bit) SP1 with DMD 2.056 (for some reason) using
> phobos 2.055:
> ---------command prompt---------
> C:\Users\Tobse\Documents\chat>dmd test.d
> OPTLINK (R) for Win32 Release 8.00.12
> Copyright (C) Digital Mars 1989-2010 All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> OPTLINK : Warning 23: No Stack
> test.obj(test)
> Error 42: Symbol Undefined _D14TypeInfo_Class6__vtblZ
> test.obj(test)
> Error 42: Symbol Undefined _D6Object7__ClassZ
> test.obj(test)
> Error 42: Symbol Undefined
> _D6object6Object8opEqualsMFC6ObjectC6ObjectZb
> test.obj(test)
> Error 42: Symbol Undefined _D6object6Object6toHashMFZk
> test.obj(test)
> Error 42: Symbol Undefined _D6object6Object8toStringMFZAya
> test.obj(test)
> Error 42: Symbol Undefined _D6object6Object5opCmpMFC6ObjectZi
> test.obj(test)
> Error 42: Symbol Undefined _D6object6Object8opEqualsMFC6ObjectZb
> OPTLINK : Warning 134: No Start Address
> --- errorlevel 7
> ---------END---------
This does not link because there is no main function. main() is required
to link.
Note the "Warning 134: No Start Address" message
-Steve
More information about the Digitalmars-d
mailing list