Questions about windows support

torhu no at spam.invalid
Tue Feb 21 13:11:45 PST 2012

On 21.02.2012 18:54, Benjamin Thaut wrote:
> 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.

I see.  I assumed you were talking about linking with DLLs written in C. 
  I've never tried linking with a D DLL, except for maybe a simple test 

More information about the Digitalmars-d mailing list