The problem may be because you didn't specify calling convention for members of your class. The default convention is __cdecl, but your client DLL may use __stdcall or any other. You should specify convenction like this:
void __cdecl append(bar<size_t> const &inData)
http://msdn.microsoft.com/en-us/library/k2b2ssfy.aspx[
^]
In general, it is not recommended to export STL objects from DLL, because this may cause problems if modules of your application use different versions of C run-time (CRT).