Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!wuarchive!wugate!uunet!pilchuck!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.lang.c++ Subject: Re: Problem with Zortech C++ 1.07 Message-ID: <2174@dataio.Data-IO.COM> Date: 23 Oct 89 16:59:06 GMT References: <4659@spudge.UUCP> Reply-To: bright@dataio.Data-IO.COM (Walter Bright) Distribution: usa Organization: Data I/O Corporation; Redmond, WA Lines: 12 In article <4659@spudge.UUCP> thorp@spudge.UUCP (Don Thorp) writes: >Using ZorLib, I create libraries containg the object modules. I link them in >using MS-Link or BLink and ... the static constructors are never called! Why? 1. Try it with MS-LIB. ZORLIB has a lot of bugs in it. 2. Since static constructors are not referenced directly by anything, you need some reference into the .OBJ file containing the static constructor, else it will never be pulled in by the linker. Modules are only pulled in from libraries in response to trying to satisfy unresolved externals. A quick way to test this is to try to link *without* your library. If there are no unresolved externals, there is nothing in the library that is needed, and so nothing is pulled in from it.