Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcnc!gatech!hao!oddjob!gargoyle!ihnp4!ihwpt!crocker From: crocker@ihwpt.ATT.COM (ron crocker) Newsgroups: comp.lang.c++ Subject: Re: Questions about C++ Message-ID: <1807@ihwpt.ATT.COM> Date: Thu, 9-Jul-87 23:35:41 EDT Article-I.D.: ihwpt.1807 Posted: Thu Jul 9 23:35:41 1987 Date-Received: Sun, 12-Jul-87 09:23:58 EDT References: <227@nih-csl.UUCP> <134@otc.OZ> <2002@druhi.ATT.COM> <229@nih-csl.UUCP> Distribution: comp Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 31 Summary: misunderstanding > > A simple approach to using the +e option is to use +e0 (only include > > external reference to virtual table) for all .c files, and compile > > the .h files containing the class declarations using +e1 (generate > > globally accessible virtual tables). > > This won't work on my .h files -- I usually have derived classes. > ... > Have I misunderstood something? Yes, I think so. You compile D1.c and D2.c with +e0. D1.o and D2.o then refer to some external vtbls, including the one for class B. You then compile a file (or set of files if there are some conflicts) containing only header files, call it headers.c, with +e1. Now, headers.o contains the definitions for the vtbls, and ld takes care of the rest. (This all is nonsense if I have misunderstood something. However, this is the mechanism I remember using, and I believe it is a reasonable representation of what Hopkins said.) > > -- > Keith Gorlen phone: (301) 496-5363 -- Ron Crocker AT&T Bell Laboratories Room IH 6D535 Naperville-Wheaton Road Naperville, IL 60566 (312) 979-4051