digitalmars.D.learn - C++ _declspec(selectany) CApp* theApp=0;
- BLS <nanali nospam-wanadoo.fr> Sep 27 2007
- Nathan Reed <nathaniel.reed gmail.com> Sep 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
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 ? 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
Sep 27 2007








Nathan Reed <nathaniel.reed gmail.com>