DLL symbol identity

Benjamin Thaut via Digitalmars-d digitalmars-d at puremagic.com
Wed May 13 00:49:25 PDT 2015


On Wednesday, 13 May 2015 at 07:41:27 UTC, Logan Capaldo wrote:
>
> If my program only links against DLLs written in D, sure this 
> is no worse than the static library/version flag situation. But 
> one of D's features is C and C++ interop. For instance if I 
> link against a DLL that happens to provide COM objects am I 
> going to start getting weird behaviors because all the 
> DllGetClassObjects are 'unified' and we just pick one?

Well this unification will only happen for D libraries. Its not 
going to do that for non D shared libraries (e.g. written in C or 
C++). The unification is also only going to happen for things 
that are linked in via a import library. So if you load the stuff 
manually with GetProcAddress you still get the "real" thing. All 
in all the summary is, if it breaks with static libraries it will 
break with shared libraries as well. If you have multiple static 
libraries that all define a symbol called "DllGetClassObjects" 
then it won't even link.


More information about the Digitalmars-d mailing list