www.digitalmars.com         C & C++   DMDScript  

D - templates in libraries causes missing stuff

if I try dmd main.d helpers.d it works
but if you run build.bat it fails

main.obj(main)
 Error 42: Symbol Undefined
_Dhelpers__L8Interface__0_cast_to_FPS8com_GUIDC6Obje
ctPPvZi

build.bat is ....
dmd -c helpers.d
lib mylib +-helpers.obj,,
dmd -c main.d
set LIB=c:\dmd\lib;c:\dm\lib
link main.obj,main,,mylib+phobos+snn+uuid/noi

I rely on this for my build env, as I have over 32 d files to include and I
started getting complains from dmd about cmd line length.
(and it allows me to share code between projects).



begin 666 helpers.d

M("D 24E$($E)1%])4W1O<F%G93L-" T*+R\ 9&5B=6=G:6YG(&]N;'D-"FEM



M:6YD:6YG*"!,.$-/32!)(#H 3#A
M24E$7TE5;FMN;W=N(&EF7VED.PT*"6%L:6%S($E5;FMN;W=N(&EF7W1Y<&4[

M;G1E<F9A8V5":6YD:6YG*"!,.$-/32!)(#H 3#A
M>2 I('L-" EA;&EA<R!,.$-/32Y)56YK;F]W;B!I9E]S=7!E<CL-" EA;&EA
M<R!)241?24-L87-S1F%C=&]R>2!I9E]I9#L-" EA;&EA<R!)0VQA<W-&86-T


M0V]M248 .B!B:6YD:6YG7W-U<&5R+DPX0V]M248L(&EF7W1Y<&4 >PT*"7T-
M"GT-" T*=&5M<&QA=&4 3#A);G1E<F9A8V4H($PX0T]-($D .B!,.$-/32Y)
M56YK;F]W;B I('L-" EA;&EA<R!I;G-T86YC92!,.$EN=&5R9F%C94)I;F1I
M;F<H($D *2!B:6YD:6YG.PT*"4A215-53%0 8V%S=%]T;R  1U5)1" J(')I
M:60L($]B:F5C="!O+"!V;VED("HJ('!P=B I('L-" D):68 *" J<FEI9" ]


M"7)E='5R;B!%7TY/24Y415)&04-%.PT*"7T-" EA;&EA<R!)56YK;F]W;B!,
M.$-O;4EN=&5R9F%C93L-"GT-" T*=&5M<&QA=&4 3#A);G1E<F9A8V4H($PX

M*"!)("D 8FEN9&EN9SL-" E(4D5354Q4(&-A<W1?=&\H($=5240 *B!R:6ED

M8FEN9&EN9RYI9E]I9" I('L-" D)"2IP<'8 /2 H8FEN9&EN9RYI9E]T>7!E

M3#A);G1E<F9A8V4H(&)I;F1I;F<N:69?<W5P97( *2YC87-T7W1O*"!R:6ED


M23$L($PX0T]-($DR("D >PT*"6%L:6%S(&EN<W1A;F-E($PX26YT97)F86-E
M0FEN9&EN9R  23$ *2!B:6YD:6YG,3L-" EA;&EA<R!I;G-T86YC92!,.$EN

M7W1O*"!'54E$("H <FEI9"P 3V)J96-T(&\L('9O:60 *BH <'!V("D >PT*
M"0EI9B H(%-?3TL /3T :69A8V4Q+F-A<W1?=&\H(')I:60L(&\L('!P=B I


M.$-O;4EN=&5R9F%C92 Z(&)I;F1I;F<R+DPX0V]M248L(&)I;F1I;F<Q+FEF
M7W1Y<&4 >PT*"7T-"GT-" T*=&5M<&QA=&4 3#A);G1E<F9A8V4H($PX0T]-
M($DQ+"!,.$-/32!),BP 3#A
M3#A);G1E<F9A8V4H($DQ("D :69A8V4Q.PT*"6%L:6%S(&EN<W1A;F-E($PX

M*"!'54E$("H <FEI9"P 3V)J96-T(&\L('9O:60 *BH <'!V("D >PT*"0EI
M9B H(%-?3TL /3T :69A8V4Q+F-A<W1?=&\H(')I:60L(&\L('!P=B I*0T*


M;4EN=&5R9F%C92 Z(&)I;F1I;F<R+DPX0V]M248L(&)I;F1I;F<Q+FEF7W1Y
M<&4 >PT*"7T-"GT-" T*=&5M<&QA=&4 3#A);G1E<F9A8V4H($PX0T]-($DQ
M+"!,.$-/32!),BP 3#A

M:6YS=&%N8V4 3#A);G1E<F9A8V4H($DR+"!)-" I(&EF86-E,CL-" E(4D53
M54Q4(&-A<W1?=&\H($=5240 *B!R:6ED+"!/8FIE8W0 ;RP =F]I9" J*B!P



M9F%C92!,.$-O;4EN=&5R9F%C92 Z(&)I;F1I;F<R+DPX0V]M248L(&)I;F1I

`
end

begin 666 main.d
M+R]I;7!O<G0 =VEN,S(N8V]M+D],14E$3#L-"B\O:6UP;W)T('=I;C,R+F-O
M;2Y-4TA434A35#L-


M=W,I(&%L:6%S($E5;FMN;W=N($Q054Y+3D]73CL-"FEM<&]R="!H96QP97)S


M;4]B:F5C="P 0V%N4W1O<F%G92Y,.$-O;4EN=&5R9F%C90T*>PT*+R]C;&%S
M<R!&86ME4W1O<F%G92 Z($-O;4]B:F5C="P 25-T;W)A9V4 >PT*97AT97)N
M("A7:6YD;W=S*3H-" E(4D5354Q4(%%U97)Y26YT97)F86-E*$E)1"H <FEI

M=&\H(')I:60L('1H:7,L('!P=B I.PT*"7T-"B  ("!(4D5354Q4($-R96%T
M94EN<W1A;F-E*$E5;FMN;W=N(%5N:T]U=&5R+"!)240J(')I:60L('9O:60J

M($A215-53%0 3&]C:U-E<G9E<BA"3T],(&9,;V-K*0T*"7L-" D)<F5T=7)N
M($5?3D]424U03#L-
C("D-"GL-" ER971U<FX ,#L-
`
end

begin 666 build.bat
M9&UD("UC(&AE;'!E<G,N9 T*;&EB(&UY;&EB("LM:&5L<&5R<RYO8FHL+ T*
M9&UD("UC(&UA:6XN9 T*<V5T($Q)0CUC.EQD;61<;&EB.V,Z7&1M7&QI8 T*
M;&EN:R!M86EN+F]B:BQM86EN+"QM>6QI8BMP:&]B;W,K<VYN*W5U:60O;F]I

`
end
Aug 02 2003