Ref to deh_end deh_beg

Barry Denton basse42 at yahoo.com
Fri Mar 14 18:04:52 PDT 2008


Frits van Bommel Wrote:

> Barry Denton wrote:
> > /usr/lib/gcc/i586-suse-linux-gnu/4.1.2/../../../libtango-base-dmd.a(deh2.o): In function `_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable':
> > deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x9): undefined reference to `_deh_beg'
> > deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0xe): undefined reference to `_deh_beg'
> > deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x14): undefined reference to `_deh_end'
> > deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x37): undefined reference to `_deh_end'
> > /usr/lib/gcc/i586-suse-linux-gnu/4.1.2/../../../libtango-base-dmd.a(dmain2.o): In function `_D6dmain24mainUiPPaZi7runMainMFZv':
> > dmain2.d:(.text._D6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined reference to `_Dmain'
> 
> The last message means no valid main() was defined. The other symbols 
> (_deh_beg and _deh_end) are automatically generated by the compiler when 
> main() is compiled, so they will also disappear when main() is linked in.
> 
> Your D program can't run without a valid main(). Valid declarations are:
>    void main() { ... }
>    void main(char[][] args) { ... }
>    int main() { ... }
>    int main(char[][] args) { ... }
> (see <http://www.digitalmars.com/d/1.0/function.html> or 
> <http://www.digitalmars.com/d/2.0/function.html>, near the bottom)
> 
> The calling convention must be extern(D), which is the default if none 
> is specified.
> 
> I'm not sure if D 2.0 accepts main(string[] args) instead, but in D 1.0 
> string[] is identical to char[][] and should be accepted.
> ('args' may have another name, of course)


Thanks so . Had main in class , dumb



More information about the Digitalmars-d mailing list