What is wrong with this boilerplate mixin?

Don Clugston dac at nospam.com.au
Mon Oct 23 04:31:43 PDT 2006


AF wrote:
> Hello,
> 
>  To make Win programming simpler, I divided sample application
> (winsample.d) in a standard module (modwin.d) containing the
> boilerplate code, and a application (appwin.d) file.
>  Both files resides in the same directory.
>  However, it does not link:
> 
>  D:\temp\dlang5>dmd appwin.d
> c:\dmd\bin\..\..\dm\bin\link.exe appwin,,,user32+kernel32/noi;
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
> 
> c:\dm\bin\..\lib\SNN.lib(winstart)
>  Error 42: Symbol Undefined _WinMain at 16

If this is exactly what you typed, the reason is simple -- dmd doesn't 
automatically link the modwin.d file.
Try:
dmd appwin.d modwin.d

or download build from dsource, and type
build appwin.d



More information about the Digitalmars-d-learn mailing list