Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!sparrms!sparatd!mb From: mb@sparrms.ists.ca (Mike Bell) Newsgroups: comp.lang.c++ Subject: NIH Class Library Problem Message-ID: <1991May14.134800.9789@sparrms.ists.ca> Date: 14 May 91 13:48:00 GMT Organization: Spar Aerospace Ltd, Toronto, Canada Lines: 24 Has anybody successfully built and used version 3.0 of the NIH Class library using Sun C++2.0 on a Sun 3? (SunOS 4.1) (If you're unfamiliar with the NIH Class Library, it is descibed in the excellent book "Data Abstraction and Object-oriented Programming in C++", K.E.Gorlen, S.M.Orlow, & P.S.Plexico, Wiley 1991. It's available by ftp, or for $16.95 from the publishers.) I'm having a problem getting the startup code in the class library to work: a procedure _main.c apparently seizes control before the main() procedure in a program to initialise parts of the NIH class library. Unfortunately, when I include this module in the library, it doesn't appear to return control to the parts of the normal system library that initialise static objects such as cin, cout, cerr. Consequently all the test programs crash. If I remove the _main.o module from the library, then certain NIH classes (which depend upon the functionality of _main.o) no longer work. Anybody run into this one? Is there something obvious I'm missing? (I've emailed the authors - but presumably they are on vacation as I've received no reply yet).