Status D dynamic libs?

Frank Benoit keinfarbton at googlemail.com
Sat Apr 19 17:19:13 PDT 2008


e-t172 schrieb:
> Frank Benoit a écrit :
>> Can "new MyClass" be called?
> 
> Yes, why not?

In my understanding, if you have an object reference, a virtual call can 
be done with it. The reference points you to the vtable, and that to the 
methods address.

What about static, non-virtual and ctor calls?
- static & ctor: no obj ref, hence no access to vtable
- final & package methods: probably not in the vtable
- public static member vars: access over global address
I don't know, this is just a guess.

If the .dll/.so is statically linked the linker does the magic.

But if you load the .so/.dll dynamically, the address needs to be loaded 
via dlsym() or getProcAddress()?

This is why i think the ctor might be problematic.







More information about the Digitalmars-d mailing list