What is the D2 language equivalent of __declspec(dllexport)
I have the D2 DLL linkage example code up and running. Exporting functions, both in dmd's mangled name space as well as well as in standard u-mangled "C" name space, works like a charm. But I'm running into uncharted waters regarding the sharing of a (global) int Variable between DLL's as well as the main exe program... I've checked the DLL symbol table with depends22_x86 and while I made a point of using the export directive just before the Var's declaration, it does not show up in the DLL's table, while functions do. Can one export Varibles to be visible in a DLL with the Digital Mars dmd tool chain?
This was a bug in the compiler (Bugzilla 10059). The following code should work now.
export __gshared int foo;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With