What is wrong with this boilerplate mixin?

AF noemail at noemail.com
Sun Oct 22 22:56:08 PDT 2006


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

 So, what to do? And, 2nd, could things be made simpler? Attached
are modwin.d and appwin.d.
begin 644 appwin.d
M:6UP;W)T(&UO9'=I;CL-"FEM<&]R="!S=&0N8RYW:6YD;W=S+G=I;F1O=W,[
M#0H-"FUI>&EN(%=I;D%P<#L-"@T*#0II;G0@;7E7:6Y-86EN*$A)3E-404Y#
M12!H26YS=&%N8V4L2$E.4U1!3D-%(&A0<F5V26YS=&%N8V4L3%!35%(@;'!#
M;61,:6YE+&EN="!N0VUD4VAO=RD-"GL-"@E-97-S86=E0F]X02AN=6QL+")-
M97-S86=E('1E>'0B+")-97-S86=E('1I=&QE(BQ-0E]/2RD[#0H@("`@+RH@
M+BXN(&EN<V5R="!U<V5R(&-O9&4@:&5R92`N+BX@*B\-"B`@("!R971U<FX@
%,#L-"GT`
`
end
begin 644 modwin.d
M;6]D=6QE(&UO9'=I;CL-"@T*<')I=F%T92!I;7!O<G0@<W1D+F,N=VEN9&]W
M<RYW:6YD;W=S.PT*#0IE>'1E<FX@*$,I('9O:60 at 9V-?:6YI="@I.PT*97AT
M97)N("A#*2!V;VED(&=C7W1E<FTH*3L-"F5X=&5R;B`H0RD@=F]I9"!?;6EN
M:70H*3L-"F5X=&5R;B`H0RD@=F]I9"!?;6]D=6QE0W1O<B at I.PT*97AT97)N
M("A#*2!V;VED(%]M;V1U;&5$=&]R*"D[#0IE>'1E<FX@*$,I('9O:60 at 7VU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C;VQL96-T;W(-"@D@("`@<F5T=7)N(')E
,<W5L=#L-"@E]#0I]
`
end



More information about the Digitalmars-d-learn mailing list