Path: utzoo!attcan!uunet!husc6!uwvax!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!grunwald From: grunwald@m.cs.uiuc.edu Newsgroups: comp.lang.c++ Subject: Re: Managing C++ Libraries: Using +e0 a Message-ID: <4800042@m.cs.uiuc.edu> Date: 3 Nov 88 17:17:00 GMT References: <4981@thorin.cs.unc.edu> Lines: 26 Nf-ID: #R:thorin.cs.unc.edu:4981:m.cs.uiuc.edu:4800042:000:614 Nf-From: m.cs.uiuc.edu!grunwald Nov 3 11:17:00 1988 The problem with +e0 is that if a library routine has something like: --Bar.h-- class Foo; class Bar { Foo *instance public: Bar() } --Bar.cc-- Bar::Bar() { instance = new Foo; } and you compile Bar.cc with +e0, and your program never references ``Foo.h'', your constructor doesn't get created. This is one of the problems of compiling directly to C code. You really want to pass information to the loader in the form of ``stabs'' or COFF info saying ``hey, I'm using class Foo'' and ``Foo has the following vtbl''. Then, the loader can sort through these entries, producing a single vtbl at compile time.