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.o
0000000000059860 s __ZTIN5boost21errinfo_api_function_E
ClassB.o
0000000000059870 s __ZTIN5boost21errinfo_api_function_E
Now, when the linker tries to link ClassA.o and ClassB.o to the main.o the both symbols clashes. But that would mean I could never use Boost.Exception or any other template instantiated type in a library.
Best Regards
Georg