Class inheritance bug
Steven Schveighoffer
schveiguy at yahoo.com
Mon Nov 14 05:41:02 PST 2011
On Fri, 11 Nov 2011 17:51:38 -0500, Tobias M. <tobias.m at onlinehome.de>
wrote:
>> This does not link because there is no main function. main() is required
>> to link.
>>
>> Note the "Warning 134: No Start Address" message
>>
>> -Steve
>
> Why has the lack of a main funcktion (or start address) something to do
> with unimplemented methods?
There are no unimplemented methods. They just aren't being linked in.
All is fixed with a main method.
If you wish to compile code without linking, you can do it via dmd -c.
Then you will not get linker errors without a main method.
General rule of thumb -- if you are getting linker errors, most likely the
issue is with your build (i.e. you aren't passing enough stuff on the
command line, or in the right order). The one exception is the main
function, which is always expected by the linker, and must be provided by
you (it's not in any library).
-Steve
More information about the Digitalmars-d
mailing list