On Wed, Oct 2, 2013 at 3:06 PM, Georg Leidinger <georg.leidinger@googlemail.com> wrote:
Hi Emil,I was able to figure out some more information about the issue and I could isolate it a little bit more. First it doesn't matter if it is a static or a shared library. Second it is not directly related to the Boost.Exception library but to the template class error_info which is used to create the predefined errinfo_xyz types. It is enough to instantiate the errinfo_api_function type in both doSomething() methods in the both implementation files. I am not so good in templates but I guess that the compiler creates the same symbol in both object files (ClassA.o and ClassB.o) for the type errinfo_api_function. I can see this via nm that I have the following line in both object files:ClassA.o0000000000059860 s __ZTIN5boost21errinfo_api_function_EClassB.o0000000000059870 s __ZTIN5boost21errinfo_api_function_EInstantiating a template in two compilation units should not lead to link errors. That's why I can't understand why this happens.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users