www.digitalmars.com         C & C++   DMDScript  

c++ - Linkage failure for generic stack template

The files attached below compiles but linkage fails:

C:\Upload> dmc -cpp problem.cpp
link problem,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

problem.obj(problem)
 Error 42: Symbol Undefined ??6 YAAAVostream  AAV0 ABV?
$stack H   Z (ostream &cd
ecl <<(ostream &,stack<int > const &))

--- errorlevel 1

Any help or suggestions are welcome.

Thanks,
Edward
begin 644 problem.h
M+R\ 26UP;&5M96YT(&$ 9V5N97)I8R!S=&%C:R!C;&%S<R!U<VEN9R!T96UP
M;&%T97,N#0H-" T*(VEN8VQU9&4 /&EO<W1R96%M+F ^#0HC:6YC;'5D92`\
M<W1R:6YG+F ^#0H-" T*=&5M<&QA=&4\8VQA<W, 5#X-"F-L87-S('-T86-K
M('L-" T*("` ('!U8FQI8SH-" T*("` ('-T86-K*'-I>F5?="!S:7IE(#T 
M,3`I.PT*("` ('YS=&%C:R I.PT*("` (&9R:65N9"!O<W1R96%M("9O<&5R
M871O<CP\*&]S=')E86T )F]S+"!C;VYS="!S=&%C:R`F<RD[#0H-"B` ("!P
M<FEV871E. T*#0H ("` 5"`J8F%S93L-"B` ("!4("IT;W`[#0H ("` <VEZ
M95]T('-I>F4[#0H-"GT[#0H-" T*=&5M<&QA=&4\8VQA<W, 5#X-"G-T86-K
M/%0^.CIS=&%C:RAS:7IE7W0 <VEZ92D >PT*("` (&)A<V4 /2!N97< 5%MS
M:7IE73L-"B` ("!T;W` /2!T:&ES+3YB87-E("T ,3L-"B` ("!S:7IE(#T 
M<VEZ93L-"GT-" T*#0IT96UP;&%T93QC;&%S<R!4/ T*<W1A8VL\5#XZ.GYS
M=&%C:R I('L-"B` ("!D96QE=&5;72!B87-E.PT*?0T*#0H-"G1E;7!L871E
M/&-L87-S(%0^#0IO<W1R96%M("9O<&5R871O<CP\*&]S=')E86T )F]S+"!C
M;VYS="!S=&%C:SQ4/B`F<RD >PT*("` (&9O<B`H5"`J<'1R(#T <RYT;W` 
M.R!P='( /CT <RYB87-E(#L <'1R+2TI('L-"B` ("` ("` ;W, /#P *G!T
F<B`\/"!E;F1L.PT*("` ('T-"B` ("!R971U<FX ;W,[#0I]#0H`
`
end
begin 644 problem.cpp
M+R\ 5&5S="!P<F]G<F%M(&9O<B!M>2!S=&%C:R!C;&%S<RX-" T*#0HC:6YC
M;'5D92`\:6]S=')E86TN:#X-"B\O($=E="!M>2!S=&%C:R!C;&%S<RX-"B-I
M;F-L=61E(")P<F]B;&5M+F B#0H-" T*:6YT(&UA:6XH*2![#0H-"B` ("!S
M=&%C:SQI;G0^(&9I<G-T.PT*("` (&-O=70 /#P 9FER<W0[#0H-"B` ("!R
/971U<FX ,#L-" T*?0T*
`
end
Oct 04 2006