www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - __declspec(dllexport)

reply "Peter Lindener" <Lindener.Peter GMail.com> writes:
D2 is Great, I've got D based numeric array DLLs extending Python 
Numpy..
My Question is:
   What is the D2 language's equivalent for __declspec(dllexport)..
Can one export variables as well as functions from a DLL's symbol 
table, while programing in D2 with dmd?

   -Peter
Jan 15 2012
next sibling parent Timon Gehr <timon.gehr gmx.ch> writes:
On 01/16/2012 04:26 AM, Peter Lindener wrote:
 D2 is Great, I've got D based numeric array DLLs extending Python Numpy..
 My Question is:
 What is the D2 language's equivalent for __declspec(dllexport)..
Afaik it is simply the 'export' storage class.
 Can one export variables as well as functions from a DLL's symbol table,
 while programing in D2 with dmd?

 -Peter
I'd suspect yes, but I don't work on windows.
Jan 15 2012
prev sibling parent "Adam Wilson" <flyboynw gmail.com> writes:
On Sun, 15 Jan 2012 19:26:38 -0800, Peter Lindener  
<Lindener.Peter gmail.com> wrote:

 D2 is Great, I've got D based numeric array DLLs extending Python Numpy..
 My Question is:
    What is the D2 language's equivalent for __declspec(dllexport)..
 Can one export variables as well as functions from a DLL's symbol table,  
 while programing in D2 with dmd?

    -Peter
The 'export' storage class is what you are looking for. It works as public and__declspec(dllexport) on Windows and just public on all others. Export works on classes/structs/functions/properties/variables. Basically anything that can be exported by a DLL can be marked 'export'. -- Adam Wilson Project Coordinator The Horizon Project http://www.thehorizonproject.org/
Jan 16 2012