   dll, static and template
  http://www.gamedev.net/community/forums/topic.asp?topic_id=384292I've got the same problem. A static\global template variable wich is double up between modules. Can you explain what did you mean by "register by a macro" ? Is there is good way to have one and only one instance of a template class static member between DLLs ? Something like force the generated code to the dll side, and  force all module to use it, not generate a new class ?[Edited by - Woodchuck on February 26, 2008 11:26:52 AM]
  Erf, no answer, Is the problem clear ? Is it impossible to solve ? Or Is there no problem and I miss something ? How do you handle exported template in dlls ?Thank you.   ;  Ok here is a solution : http://www.codeproject.com/KB/cpp/MemberTemplateDLL.aspx.But what about instanciate a class that is not in the dll side ?   ;  I think you got no answers, because no one really understands what you actually want (me included :) Why don't you explain what you are trying to do, instead of pointing to some other thread ?In essence, yes, exporting templated classes can be a pain, and is usually best avoided, unless you can link the member definitions into all modules separately (ie. duplicate them), so that the linker can find them.And yes, globals are duplicated across modules, unless explicitely exported. And since exporting templated objects is problematic, you run into a issues.I think the entire approach of the guy in that other thread (using an autoregister singleton) is highly flawed and a huge mess. There are much cleaner way to handle a plugin system without resorting to templated singletons duplicating themselves. But then again, I have no idea what you actually need...   