Path: utzoo!utgpu!attcan!uunet!mcvax!ukc!strath-cs!glasgow!orr From: orr@cs.glasgow.ac.uk (Fraser Orr) Newsgroups: comp.lang.c++ Subject: Re: Managing C++ Libraries: Problems Defined Message-ID: <1814@crete.cs.glasgow.ac.uk> Date: 2 Nov 88 14:21:05 GMT References: <4959@thorin.cs.unc.edu> Reply-To: orr%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk (Fraser Orr) Organization: Comp Sci, Glasgow Univ, Scotland Lines: 48 In article <4959@thorin.cs.unc.edu> coggins@coggins.cs.unc.edu (Dr. James Coggins) writes: >The management of dependencies and header files in a C++ library is an >essential problem that, for many potential C++ developers, seriously >limits the usefulness of the language. We have developed a scheme >that ensures efficient inclusion of required header files while >requiring minimal effort from the application developer. This scheme >is not difficult to use, but it is rather intricate and takes some >effort to establish. Once in place, however, maintenance and use of >the library are greatly simplified. We will describe this I also have developed a scheme to simplify the management of header files (as part of a larger program managment scheme.) It is simple to use and set up. And after a short while becomes almost unnoticable. In essence each chunk of Code begins with a line that names that chunk and gives it a type. (The type of information contained in that chunk, class, type declerations etc) This is followed by a line explaining what other chunks are used. This is run through a preprocessor that inserts the appropriate includes and declarations. A quick example will illuminate . You type ... Class Queue Uses ItemType Class Queue { ItemType Data [100] ; public: . . . } ; And the declaration of ItemType is automatically inserted. It works by keeping a file of names and associated decalrations which is maintained from compile to compile. This (in my humble opinion) is what should have happened in the first place. I heard at a conference I was at recently, that the next version of C++ from AT&T is going to include type info in the .o files, and check inter module type infromation at link time. Does anyone know if this rumour is true? ==Fraser Orr ( Dept C.S., Univ. Glasgow, Glasgow, G12 8QQ, UK) UseNet: {uk}!cs.glasgow.ac.uk!orr JANET: orr@uk.ac.glasgow.cs ARPANet(preferred xAtlantic): orr%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk