digitalmars.D.learn - C++ _declspec(selectany) CApp* theApp=0;
- BLS (5/5) Sep 27 2007 _declspec(selectany) CApp* theApp=0;
- Nathan Reed (9/16) Sep 27 2007 In C++, declspec(selectany) is a directive to the linker to ignore
_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
Sep 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 ? BjoernIn 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
Sep 27 2007