Questions about windows support

Benjamin Thaut code at
Tue Feb 21 09:54:35 PST 2012

Am 21.02.2012 04:08, schrieb torhu:
> On 20.02.2012 22:36, Benjamin Thaut wrote:
>> 2) Will dmd support exporting/importing data symbols from dlls? I know
>> there is a patch that does the data symbol address patching from the
>> runtime but thats a feature that should be supported by the compiler
>> directly in my eyes.
> Importing data symbols works just fine both in DMD and GDC. At least it
> did a couple of years ago. Can't remember if I've tried exporting, but I
> wouldn't be surprised if it worked.
> You don't need to do anything special to get it working, just use
> declare the data as 'export extern extern (C)' in your D code. For D2
> prefix that with '__gshared'. Not very elegent, but it does work.

I tried that but it does not work. For example compiler generatd data 
symbols like the module info or the vtable don't get exported even if 
the class is declared as "export"  Also the tls storage does not work 
with threads across dll boundaries. And a lot of other stuff. I consider 
dll support working as soon as phobos is a shared dll.

Kind Regards
Benjamin Thaut

More information about the Digitalmars-d mailing list