September 27, 2007
_declspec(selectany) CApp* theApp=0;
I guess it is just a global var .... in D probabely simply :

CApp theApp = null;

I don't know. Some ideas ?
Bjoern
September 27, 2007
BLS wrote:
> _declspec(selectany) CApp* theApp=0;
> I guess it is just a global var .... in D probabely simply :
> 
> CApp theApp = null;
> 
> I don't know. Some ideas ?
> Bjoern

In C++, declspec(selectany) is a directive to the linker to ignore multiple definitions of a symbol, and just pick one arbitrarily at link time.

In D, there is no equivalent, but then you shouldn't need one, as you can define the variable in some module and import the module in all other modules that need it.

Thanks,
Nathan Reed
Top | Discussion index | About this forum | D home