February 16, 2008
Sergey Gromov wrote:
> torhu <no@spam.invalid> wrote:
>> It's needed when linking to variables that are in a DLL, though.  If you don't add it, even variable declarations with the 'extern' storage class will turn into definitions.
> 
> This explains it, thanks.  This also means that export is sometimes also import because extern is not actually for an extern symbol but merely a calling convention specifier.

This guide mostly explains it:
http://www.digitalmars.com/d/2.0/htomodule.html


And yes, 'export' is used for imports too.

Just 'extern' works like in C, while 'extern (XYZ)' is really an unrelated feature.
1 2
Next ›   Last »